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) The list of allowed route prefixes.association_region_id
- (Required, ForceNew) The region ID of the resource to be associated.ecr_id
- (Required, ForceNew) The ECR ID.vpc_id
- (Required, ForceNew) The VPC ID.vpc_owner_id
- (Optional, ForceNew) The ID of the Alibaba Cloud account that owns the VPC. -> NOTE: If you want to connect to a network instance that belongs to a different account,vpc_owner_id
is required.
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 ID of the association between the ECR and the VPC.create_time
- The time when the association was created.status
- The deployment state of the associated 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>
该文章对您有帮助吗?