Skip to content

Data Source: awsControltowerControls

List of Control Tower controls applied to an OU.

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 dataAwsOrganizationsOrganizationThis =
  new aws.dataAwsOrganizationsOrganization.DataAwsOrganizationsOrganization(
    this,
    "this",
    {}
  );
const dataAwsOrganizationsOrganizationalUnitsThis =
  new aws.dataAwsOrganizationsOrganizationalUnits.DataAwsOrganizationsOrganizationalUnits(
    this,
    "this_1",
    {
      parentId: `\${${dataAwsOrganizationsOrganizationThis.roots.fqn}[0].id}`,
    }
  );
/*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/
dataAwsOrganizationsOrganizationalUnitsThis.overrideLogicalId("this");
const dataAwsControltowerControlsThis =
  new aws.dataAwsControltowerControls.DataAwsControltowerControls(
    this,
    "this_2",
    {
      targetIdentifier: [
        `\${[
    for x in ${dataAwsOrganizationsOrganizationalUnitsThis.children} :
    x.arn if x.name == "Security"
  ][0]}`,
      ],
    }
  );
/*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/
dataAwsControltowerControlsThis.overrideLogicalId("this");

Argument Reference

The following arguments are required:

  • targetIdentifier - (Required) The ARN of the organizational unit.

Attribute Reference

In addition to all arguments above, the following attributes are exported:

  • enabledControls - List of all the ARNs for the controls applied to the targetIdentifier.