Skip to content

Data Source: awsOrganizationsOrganizationalUnits

Get all direct child organizational units under a parent organizational unit. This only provides immediate children, not all children.

Example Usage

/*Provider bindings are generated by running cdktf get.
See https://cdk.tf/provider-generation for more details.*/
import * as aws from "./.gen/providers/aws";
const dataAwsOrganizationsOrganizationOrg =
  new aws.dataAwsOrganizationsOrganization.DataAwsOrganizationsOrganization(
    this,
    "org",
    {}
  );
new aws.dataAwsOrganizationsOrganizationalUnits.DataAwsOrganizationsOrganizationalUnits(
  this,
  "ou",
  {
    parentId: `\${${dataAwsOrganizationsOrganizationOrg.roots.fqn}[0].id}`,
  }
);

Argument Reference

  • parentId - (Required) Parent ID of the organizational unit.

Attributes Reference

  • children - List of child organizational units, which have the following attributes:
  • arn - ARN of the organizational unit
  • name - Name of the organizational unit
  • id - ID of the organizational unit
  • id - Parent identifier of the organizational units.