Skip to content

Data Source: awsOrganizationsOrganizationalUnitChildAccounts

Get all direct child accounts 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.dataAwsOrganizationsOrganizationalUnitChildAccounts.DataAwsOrganizationsOrganizationalUnitChildAccounts(
  this,
  "accounts",
  {
    parentId: `\${${dataAwsOrganizationsOrganizationOrg.roots.fqn}[0].id}`,
  }
);

Argument Reference

  • parentId - (Required) The parent ID of the accounts.

Attributes Reference

  • accounts - List of child accounts, which have the following attributes:
  • arn - The Amazon Resource Name (ARN) of the account.
  • email - The email address associated with the AWS account.
  • id - The unique identifier (ID) of the account.
  • name - The friendly name of the account.
  • status - The status of the account in the organization.
  • id - Parent identifier of the organizational units.