Provides a VPC Route Table resource. Currently, customized route tables are available in most regions apart from China (Beijing), China (Hangzhou), and China (Shenzhen) regions.
For information about VPC Route Table and how to use it, see What is Route Table.
Basic Usage
variable "name" {
default = "terraform-example"
}
resource "alicloud_vpc" "defaultVpc" {
vpc_name = var.name
}
resource "alicloud_route_table" "default" {
description = "test-description"
vpc_id = alicloud_vpc.defaultVpc.id
route_table_name = var.name
associate_type = "VSwitch"
}
The following arguments are supported:
associate_type
- (Optional, ForceNew, Computed) The type of cloud resource that is bound to the routing table. Value:
description
- (Optional) Description of the routing table.route_table_name
- (Optional) The name of the routing table.tags
- (Optional, Map) The tag.vpc_id
- (Required, ForceNew) The ID of VPC.The following arguments will be discarded. Please use new fields as soon as possible:
name
- (Deprecated from v1.119.1+) Field 'name' has been deprecated from provider version 1.119.1. New field 'route_table_name' instead.The following attributes are exported:
id
- The ID of the resource supplied above.create_time
- The creation time of the routing table.resource_group_id
- Resource group ID.status
- Routing table state.The timeouts
block allows you to specify timeouts for certain actions:
create
- (Defaults to 10 mins) Used when create the Route Table.delete
- (Defaults to 10 mins) Used when delete the Route Table.update
- (Defaults to 10 mins) Used when update the Route Table.VPC Route Table can be imported using the id, e.g.
$ terraform import alicloud_vpc_route_table.example <id>