alicloud_resource_manager_shared_resource

Provides a Resource Manager Shared Resource resource.

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

Example Usage

Basic Usage

variable "name" {
  default = "tfexample"
}
data "alicloud_zones" "example" {
  available_resource_creation = "VSwitch"
}

resource "alicloud_vpc" "example" {
  vpc_name   = var.name
  cidr_block = "192.168.0.0/16"
}

resource "alicloud_vswitch" "example" {
  zone_id      = data.alicloud_zones.example.zones.0.id
  cidr_block   = "192.168.0.0/16"
  vpc_id       = alicloud_vpc.example.id
  vswitch_name = var.name
}

resource "alicloud_resource_manager_resource_share" "example" {
  resource_share_name = var.name
}

resource "alicloud_resource_manager_shared_resource" "example" {
  resource_id       = alicloud_vswitch.example.id
  resource_share_id = alicloud_resource_manager_resource_share.example.id
  resource_type     = "VSwitch"
}

Argument Reference

The following arguments are supported:

Attributes Reference

The following attributes are exported:

Timeouts

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

Import

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

$ terraform import alicloud_resource_manager_shared_resource.example <resource_share_id>:<resource_id>:<resource_type>