alicloud_resource_manager_shared_target

更新时间:

Provides a Resource Manager Shared Target resource.

For information about Resource Manager Shared Target and how to use it, see What is Shared Target.

-> NOTE: Available since v1.111.0.

Example Usage

Basic Usage


variable "name" {
  default = "terraform-example"
}

data "alicloud_resource_manager_accounts" "default" {
}

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

resource "alicloud_resource_manager_resource_share" "default" {
  resource_share_name = "${var.name}-${random_integer.default.result}"
}

resource "alicloud_resource_manager_shared_target" "default" {
  resource_share_id = alicloud_resource_manager_resource_share.default.id
  target_id         = data.alicloud_resource_manager_accounts.default.ids.0
}

Argument Reference

The following arguments are supported:

  • resource_share_id - (Required, ForceNew) The ID of the resource share.
  • target_id - (Required, ForceNew) The ID of the principal.

Attributes Reference

The following attributes are exported:

  • id - The ID of the resource supplied above.The value is formulated as <resource_share_id>:<target_id>.
  • create_time - (Available since v1.259.0) The time when the association of the entity was created.
  • status - The status of shared target.

Timeouts

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

  • create - (Defaults to 10 mins) Used when create the Shared Target.
  • delete - (Defaults to 10 mins) Used when delete the Shared Target.

Import

Resource Manager Shared Target can be imported using the id, e.g.

$ terraform import alicloud_resource_manager_shared_target.example <resource_share_id>:<target_id>