Data source

dcloud_iam_policies

The organization's IAM policies, managed (AdministratorAccess, …) and custom.

Example Usage

data "dcloud_iam_policies" "all" {}

# Attach a managed policy by name.
resource "dcloud_iam_group_policy_attachment" "readers" {
  group_id  = dcloud_iam_group.readers.id
  policy_id = [for p in data.dcloud_iam_policies.all.items : p.id if p.name == "ReadOnlyAccess"][0]
}

Schema

Read-Only

Nested Schema for items

Read-Only:

  • description (String) Description.
  • id (String) Policy id; policy_id of the attachment resources.
  • name (String) Name.
  • type (String) managed or custom.

Generated from the provider's schema.