Get all direct child organizational units under a parent organizational unit. This only provides immediate children, not all children.
data "aws_organizations_organization" "org" {}
data "aws_organizations_organizational_units" "ou" {
parent_id = data.aws_organizations_organization.org.roots[0].id
}
parent_id
- (Required) Parent ID of the organizational unit.This data source exports the following attributes in addition to the arguments above:
children
- List of child organizational units, which have the following attributes:
arn
- ARN of the organizational unitname
- Name of the organizational unitid
- ID of the organizational unitid
- Parent identifier of the organizational units.