alicloud_express_connect_router_vpc_association

更新时间:

Provides a Express Connect Router Express Connect Router Vpc Association resource. Bind relationship object between leased line gateway and VPC.

For information about Express Connect Router Express Connect Router Vpc Association and how to use it, see What is Express Connect Router Vpc Association.

-> NOTE: Available since v1.224.0.

Example Usage

Basic Usage


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

provider "alicloud" {
  region = "cn-hangzhou"
}

resource "alicloud_vpc" "default8qAtD6" {
  cidr_block = "172.16.0.0/16"
}

resource "alicloud_express_connect_router_express_connect_router" "defaultM9YxGW" {
  alibaba_side_asn = "65533"
}

data "alicloud_account" "current" {
}

resource "alicloud_express_connect_router_vpc_association" "default" {
  ecr_id = alicloud_express_connect_router_express_connect_router.defaultM9YxGW.id
  allowed_prefixes = [
    "172.16.4.0/24",
    "172.16.3.0/24",
    "172.16.2.0/24",
    "172.16.1.0/24"
  ]
  vpc_owner_id          = data.alicloud_account.current.id
  association_region_id = "cn-hangzhou"
  vpc_id                = alicloud_vpc.default8qAtD6.id
}

Argument Reference

The following arguments are supported:

  • allowed_prefixes - (Optional) List of allowed route prefixes.
  • association_region_id - (Required, ForceNew) The region to which the VPC or TR belongs.
  • ecr_id - (Required, ForceNew) The ID of the leased line gateway instance.
  • vpc_id - (Required, ForceNew) The ID of the VPC instance.
  • vpc_owner_id - (Optional, ForceNew) The ID of the Alibaba Cloud account to which the VPC belongs.

Attributes Reference

The following attributes are exported:

  • id - The ID of the resource supplied above.The value is formulated as <ecr_id>:<association_id>:<vpc_id>.
  • association_id - The first ID of the resource.
  • create_time - The creation time of the resource.
  • status - The status of the resource.

Timeouts

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

  • create - (Defaults to 5 mins) Used when create the Express Connect Router Vpc Association.
  • delete - (Defaults to 5 mins) Used when delete the Express Connect Router Vpc Association.
  • update - (Defaults to 5 mins) Used when update the Express Connect Router Vpc Association.

Import

Express Connect Router Express Connect Router Vpc Association can be imported using the id, e.g.

$ terraform import alicloud_express_connect_router_vpc_association.example <ecr_id>:<association_id>:<vpc_id>