alicloud_ram_roles

The Ram Roles data source provides a list of Alicloud Ram Roles in an Alicloud account according to the specified filters.

Example Usage

data "alicloud_ram_roles" "role" {
  output_file = "roles.txt"
  name_regex = ".*test.*"
  policy_name = "AliyunACSDefaultAccess"
  policy_type = "Custom"
}

Argument Reference

The following arguments are supported:

  • name_regex - (Optional) A regex string to apply to the role list returned by Alicloud.
  • policy_type - (Optional) Limit search to specific the policy type. Valid items are Custom and System. If you set this parameter, you must set policy_name at one time.
  • policy_name - (Optional) Limit search to specific the policy name. If you set this parameter without set policy_type, we will specified it as System. Found the roles which attached with the specified policy.
  • output_file - (Optional) The name of file that can save roles data source after running terraform plan.

Attributes Reference

A list of roles will be exported and its every element contains the following attributes:

© 2018 HashiCorp
Licensed under the MPL 2.0 License.
https://www.terraform.io/docs/providers/alicloud/d/ram_roles.html