alicloud_ram_groups
更新时间:
This data source provides a list of RAM Groups in an Alibaba Cloud account according to the specified filters.
-> NOTE: Available since v1.0.0+.
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, ForceNew) A regex string to filter the returned groups by their names.user_name
- (Optional, ForceNew) Filter the results by a specific the user name.policy_type
- (Optional, ForceNew) 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, ForceNew) 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:
names
- A list of ram group names.groups
- A list of groups. Each element contains the following attributes:name
- Name of the group.comments
- Comments of the group.
文档内容是否对您有帮助?