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
items(Attributes List) One object per element. (see below for nested schema)
Nested Schema for items
Read-Only:
description(String) Description.id(String) Policy id;policy_idof the attachment resources.name(String) Name.type(String)managedorcustom.
Generated from the provider's schema.
Related