Resource: aws_organizations_organizational_unit

Provides a resource to create an organizational unit.

Example Usage

resource "aws_organizations_organizational_unit" "example" {
  name      = "example"
  parent_id = aws_organizations_organization.example.roots[0].id
}

Argument Reference

This resource supports the following arguments:

Attribute Reference

This resource exports the following attributes in addition to the arguments above:

Import

In Terraform v1.5.0 and later, use an import block to import AWS Organizations Organizational Units using the id. For example:

import {
  to = aws_organizations_organizational_unit.example
  id = "ou-1234567"
}

Using terraform import, import AWS Organizations Organizational Units using the id. For example:

% terraform import aws_organizations_organizational_unit.example ou-1234567