alicloud_resource_manager_delegated_administrator

更新时间:

Provides a Resource Manager Delegated Administrator resource.

For information about Resource Manager Delegated Administrator and how to use it, see What is Delegated Administrator.

-> NOTE: Available since v1.181.0.

Example Usage

Basic Usage


variable "name" {
  default = "tf-example"
}
variable "display_name" {
  default = "EAccount"
}

resource "random_integer" "default" {
  min = 10000
  max = 99999
}

data "alicloud_resource_manager_folders" "example" {

}

resource "alicloud_resource_manager_account" "example" {
  display_name = "${var.display_name}-${random_integer.default.result}"
  folder_id    = data.alicloud_resource_manager_folders.example.ids.0
}

resource "alicloud_resource_manager_delegated_administrator" "example" {
  account_id        = alicloud_resource_manager_account.example.id
  service_principal = "cloudfw.aliyuncs.com"
}

Argument Reference

The following arguments are supported:

  • account_id - (Required, ForceNew) The ID of the member account in the resource directory.
  • service_principal - (Required, ForceNew) The identification of the trusted service. NOTE: Only some trusted services support delegated administrator accounts. For more information, see Supported trusted services.

Attributes Reference

The following attributes are exported:

  • id - The resource ID of Delegated Administrator. The value formats as <account_id>:<service_principal>.

Timeouts

The timeouts block allows you to specify timeouts for certain actions:

  • create - (Defaults to 1 mins) Used when creating the Delegated Administrator.
  • delete - (Defaults to 1 mins) Used when deleting the Delegated Administrator.

Import

Resource Manager Delegated Administrator can be imported using the id, e.g.

$ terraform import alicloud_resource_manager_delegated_administrator.example <account_id>:<service_principal>