Terraform module that collects existing AWS organizational units into a map for easy consumption.
module "org_units" {
source = "cgetzen/org-units-map/aws"
depth = 4
}
resource "aws_organizations_policy" "example" {
...
}
resource "aws_organizations_policy_attachment" "example" {
policy_id = aws_organizations_policy.example.id
target_id = module.org_units.ids["production_ou"]
}
Name | Description | Type | Default | Required |
---|---|---|---|---|
depth | The org unit depth | number |
5 |
no |
Name | Description |
---|---|
ous | OU structure showing parents and children |
ids | Map of OU names to ids |