» alicloud_ram_groups
This data source provides a list of RAM Groups in an Alibaba Cloud account according to the specified filters.
» Example Usage
data "alicloud_ram_groups" "groups_ds" {
output_file = "groups.txt"
user_name = "user1"
name_regex = "^group[0-9]*"
}
output "first_group_name" {
value = "${data.alicloud_ram_groups.groups_ds.groups.0.name}"
}
» Argument Reference
The following arguments are supported:
-
name_regex
- (Optional) A regex string to filter the returned groups by their names. -
user_name
- (Optional) Filter the results by a specific the user name. -
policy_type
- (Optional) Filter the results by a specific policy type. Valid items areCustom
andSystem
. If you set this parameter, you must setpolicy_name
as well. -
policy_name
- (Optional) Filter the results by a specific policy name. If you set this parameter without settingpolicy_type
, it will be automatically set toSystem
. -
output_file
- (Optional) File name where to save data source results (after runningterraform plan
).
» Attributes Reference
The following attributes are exported in addition to the arguments listed above: