» alicloud_resource_manager_policy_versions

This data source provides the Resource Manager Policy Versions of the current Alibaba Cloud user.

» Example Usage

data "alicloud_resource_manager_policy_versions" "default" {
    policy_name = "tftest"
    policy_type = "Custom"
}

output "first_policy_version_id" {
  value = "${data.alicloud_resource_manager_policy_versions.default.versions.0.id}"
}

» Argument Reference

The following arguments are supported:

  • ids - (Optional) A list of policy version IDs.
  • output_file - (Optional) File name where to save data source results (after running terraform plan).
  • policy_name - (Required) The name of the policy.
  • policy_type - (Required) The type of the policy. Valid values:Custom and System.

» Attributes Reference

The following attributes are exported in addition to the arguments listed above:

  • ids - A list of policy version IDs.
  • versions - A list of policy versions. Each element contains the following attributes:
    • id - The ID of the resource, the value is <policy_name>:<version_id>.
    • version_id- The ID of the policy version.
    • create_date- The time when the policy version was created.
    • is_default_version- Indicates whether the policy version is the default version.