alicloud_resource_manager_role

Provides a Resource Manager role resource. Members are resource containers in the resource directory, which can physically isolate resources to form an independent resource grouping unit. You can create members in the resource folder to manage them in a unified manner. For information about Resource Manager role and how to use it, see What is Resource Manager role.

Example Usage

variable "name" {
  default = "tfexample"
}
data "alicloud_account" "default" {}

resource "alicloud_resource_manager_role" "example" {
  role_name                   = var.name
  assume_role_policy_document = <<EOF
     {
          "Statement": [
               {
                    "Action": "sts:AssumeRole",
                    "Effect": "Allow",
                    "Principal": {
                        "RAM":[
                                "acs:ram::${data.alicloud_account.default.id}:root"
                        ]
                    }
                }
          ],
          "Version": "1"
     }
     EOF
}
     {
          "Statement": [
               {
                    "Action": "sts:AssumeRole",
                    "Effect": "Allow",
                    "Principal": {
                        "RAM":[
                                "acs:ram::${data.alicloud_account.default.id}:root"
                        ]
                    }
                }
          ],
          "Version": "1"
     }
     EOF
}

Argument Reference

The following arguments are supported:

Attributes Reference

The following attributes are exported:

Import

Resource Manager can be imported using the id or role_name, e.g.

$ terraform import alicloud_resource_manager_role.example testrd