Provides a RAM Group Policy attachment resource.
# Create a RAM Group Policy attachment.
resource "alicloud_ram_group" "group" {
name = "test_group"
comments = "this is a group comments."
force = true
}
resource "alicloud_ram_policy" "policy" {
name = "test_policy"
statement = [
{
effect = "Allow"
action = [
"oss:ListObjects",
"oss:GetObject"]
resource = [
"acs:oss:*:*:mybucket",
"acs:oss:*:*:mybucket/*"]
}]
description = "this is a policy test"
force = true
}
resource "alicloud_ram_group_policy_attachment" "attach" {
policy_name = "${alicloud_ram_policy.policy.name}"
policy_type = "${alicloud_ram_policy.policy.type}"
group_name = "${alicloud_ram_group.group.name}"
}
The following arguments are supported:
group_name - (Required, Forces new resource) Name of the RAM group. This name can have a string of 1 to 64 characters, must contain only alphanumeric characters or hyphen "-", and must not begin with a hyphen. policy_name - (Required, Forces new resource) Name of the RAM policy. This name can have a string of 1 to 128 characters, must contain only alphanumeric characters or hyphen "-", and must not begin with a hyphen. policy_type - (Required, Forces new resource) Type of the RAM policy. It must be Custom or System. The following attributes are exported:
id - The attachment ID. group_name - The group name. policy_name - The policy name. policy_type - The policy type.
© 2018 HashiCorpLicensed under the MPL 2.0 License.
https://www.terraform.io/docs/providers/alicloud/r/ram_group_policy_attachment.html