Resource

dcloud_iam_user_policy_attachment

Attaches an IAM policy to an IAM user.

Example Usage

resource "dcloud_iam_user_policy_attachment" "ci_dns" {
  user_id   = dcloud_iam_user.ci.id
  policy_id = dcloud_iam_policy.dns_read.id
}

Schema

Required

  • policy_id (String) The policy to attach. Changing it replaces the resource.
  • user_id (String) The id of the parent resource ({id} in the path). Changing it replaces the resource.

Read-Only

  • id (String) The resource's id.

Import

Import is supported using the following syntax:

The terraform import command can be used, for example:

terraform import dcloud_iam_user_policy_attachment.ci_dns <iam-user-id>/<policy-id>

Generated from the provider's schema.