Provides a resource to attach an AWS Organizations policy to an organization account, root, or unit.
resource "aws_organizations_policy_attachment" "account" {
policy_id = "${aws_organizations_policy.example.id}"
target_id = "123456789012"
}
resource "aws_organizations_policy_attachment" "root" {
policy_id = "${aws_organizations_policy.example.id}"
target_id = "r-12345678"
}
resource "aws_organizations_policy_attachment" "unit" {
policy_id = "${aws_organizations_policy.example.id}"
target_id = "ou-12345678"
}
The following arguments are supported:
policy_id - (Required) The unique identifier (ID) of the policy that you want to attach to the target. target_id - (Required) The unique identifier (ID) of the root, organizational unit, or account number that you want to attach the policy to. aws_organizations_policy_attachment can be imported by using the target ID and policy ID, e.g. with an account target
$ terraform import aws_organization_policy_attachment.account 123456789012:p-12345678
© 2018 HashiCorpLicensed under the MPL 2.0 License.
https://www.terraform.io/docs/providers/aws/r/organizations_policy_attachment.html