From 1577f1075ea2c879c77900879a3a4c2b865c545f Mon Sep 17 00:00:00 2001 From: "sangkyu.kim" Date: Tue, 3 Nov 2020 22:14:12 +0900 Subject: [PATCH] add `route_table_association` --- docs/resources/route_table_association.md | 45 +++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 docs/resources/route_table_association.md diff --git a/docs/resources/route_table_association.md b/docs/resources/route_table_association.md new file mode 100644 index 000000000..a91bb3fba --- /dev/null +++ b/docs/resources/route_table_association.md @@ -0,0 +1,45 @@ +# Resource: ncloud_route_table_association + +Provide a resource to create association between route table and a subnet. + +## Example Usage + +### Basic Usage + +```hcl +resource "ncloud_vpc" "vpc" { + ipv4_cidr_block = "10.3.0.0/16" +} + +resource "ncloud_subnet" "subnet" { + vpc_no = ncloud_vpc.vpc.id + subnet = "10.3.1.0/24" + zone = "KR-2" + network_acl_no = ncloud_vpc.vpc.default_network_acl_no + subnet_type = "PUBLIC" +} + +resource "ncloud_route_table" "route_table" { + vpc_no = ncloud_vpc.vpc.id + description = "for test" + supported_subnet_type = "PUBLIC" +} + +resource "ncloud_route_table_association" "route_table_subnet" { + route_table_no = ncloud_route_table.route_table.id + subnet_no = ncloud_subnet.subnet.id +} +``` + +## Argument Reference + +The following arguments are supported: + +* `route_table_no` - (Required) The ID of the Route Table. +* `subnet_no` - (Required) The ID of Subnet to create association. + +## Attributes Reference + +In addition to all arguments above, the following attributes are exported: + +* `id` - The ID of the route table association (`route_table_no`:`subnet_no`)