hcp_organization_iam_policy (Resource)

Sets the organization's IAM policy and replaces any existing policy.

Example Usage

data "hcp_iam_policy" "example" {
  bindings = [
    {
      role = "roles/owner"
      principals = [
        "example-user-id-1",
      ]
    },
    {
      role = "roles/admin"
      principals = [
        "example-group-id-1",
        "example-sp-1"
      ]
    },
  ]
}

resource "hcp_organization_iam_policy" "org_policy" {
  policy_data = data.hcp_iam_policy.example.policy_data
}

Schema

Required

Read-Only

Import

Import is supported using the following syntax:

# No import ID is needed. The organization is determined by the provider
# configuration.
terraform import hcp_organization_iam_policy.example ""