awscc_organizations_organizational_unit (Resource)

You can use organizational units (OUs) to group accounts together to administer as a single unit. This greatly simplifies the management of your accounts. For example, you can attach a policy-based control to an OU, and all accounts within the OU automatically inherit the policy. You can create multiple OUs within a single organization, and you can create OUs within other OUs. Each OU can contain multiple accounts, and you can move accounts from one OU to another. However, OU names must be unique within a parent OU or root.

Example Usage

OU under root

To create a new OU under the root Organizations:

resource "awscc_organizations_organizational_unit" "this" {
  name      = "child-ou-lv1"
  parent_id = var.root_id
}

Nested OU

To create a nested OU

resource "awscc_organizations_organizational_unit" "level_1_ou" {
  name      = "child-ou-lv1"
  parent_id = var.root_id
}

resource "awscc_organizations_organizational_unit" "level_2_ou" {
  name      = "child-ou-lv2"
  parent_id = awscc_organizations_organizational_unit.level_1_ou.id
}

Schema

Required

Optional

Read-Only

Nested Schema for tags

Required:

Import

Import is supported using the following syntax:

$ terraform import awscc_organizations_organizational_unit.example <resource ID>