文档

alicloud_resource_manager_roles

更新时间:
一键部署

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

-> NOTE: Available in 1.86.0+.

Example Usage

data "alicloud_resource_manager_roles" "example" {
  name_regex = "tftest"
}

output "first_role_id" {
  value = "${data.alicloud_resource_manager_roles.example.roles.0.id}"
}

Argument Reference

The following arguments are supported:

  • ids - (Optional) A list of Resource Manager Role IDs.
  • name_regex - (Optional) A regex string to filter results by role name.
  • output_file - (Optional) File name where to save data source results (after running terraform plan).
  • enable_details -(Optional, Available in v1.114.0+) Default to false. Set it to true can output more details.

Attributes Reference

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

  • ids - A list of role IDs.
  • names - A list of role names.
  • roles - A list of roles. Each element contains the following attributes:
    • id - The ID of the role.
    • role_id- The ID of the role.
    • role_name- The name of the role.
    • arn- The Alibaba Cloud Resource Name (ARN) of the RAM role.
    • create_date- (Removed form v1.114.0) The time when the RAM role was created.
    • update_date- The time when the RAM role was updated.
    • description- The description of the RAM role.
    • max_session_duration- The maximum session duration of the RAM role.
    • assume_role_policy_document- (Available in v1.114.0+) The assume role policy document.

  • 本页导读 (0)
文档反馈