alicloud_resource_manager_policy
更新时间:
Provides a Resource Manager Policy resource.
For information about Resource Manager Policy and how to use it, see What is Resource Manager Policy.
-> NOTE: Available since v1.83.0.
Example Usage
Basic Usage
variable "name" {
default = "tfexample"
}
resource "alicloud_resource_manager_policy" "example" {
policy_name = var.name
policy_document = <<EOF
{
"Statement": [{
"Action": ["oss:*"],
"Effect": "Allow",
"Resource": ["acs:oss:*:*:*"]
}],
"Version": "1"
}
EOF
}
Argument Reference
The following arguments are supported:
policy_name
- (Required, ForceNew) The name of the policy. name must be 1 to 128 characters in length and can contain letters, digits, and hyphens (-).policy_document
- (Required, ForceNew) The content of the policy. The content must be 1 to 2,048 characters in length.description
- (Optional, ForceNew) The description of the policy. The description must be 1 to 1,024 characters in length.default_version
- (Optional, Computed, Deprecated from version 1.90.0) The version of the policy. Default to v1.
Attributes Reference
id
- The resource ID of policy. The value is same aspolicy_name
.policy_type
- The type of the policy. Valid values:Custom
,System
.
Import
Resource Manager Policy can be imported using the id, e.g.
$ terraform import alicloud_resource_policy.example abc12345
文档内容是否对您有帮助?