Skip to content

Commit

Permalink
providers/aws: docs for aws_main_route_table_association
Browse files Browse the repository at this point in the history
  • Loading branch information
phinze committed Feb 3, 2015
1 parent 92335b7 commit f852a01
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
---
layout: "aws"
page_title: "AWS: aws_main_route_table_association"
sidebar_current: "docs-aws-resource-main-route-table-assoc"
description: |-
Provides a resource for managing the main routing table of a VPC.
---

# aws\_main\_route\_table\_<wbr>association

Provides a resource for managing the main routing table of a VPC.

## Example Usage

```
resource "aws_main_route_table_association" "a" {
vpc_id = "${aws_vpc.foo.id}"
route_table_id = "${aws_route_table.bar.id}"
}
```

## Argument Reference

The following arguments are supported:

* `vpc_id` - (Required) The ID of the VPC whose main route table should be set
* `route_table_id` - (Required) The ID of the Route Table to set as the new
main route table for the target VPC

## Attributes Reference

The following attributes are exported:

* `id` - The ID of the Route Table Association
* `original_route_table_id` - Used internally, see __Notes__ below

## Notes

On VPC creation, the AWS API always creates an initial Main Route Table. This
resource records the ID of that Route Table under `original_route_table_id`.
The "Delete" action for a `main_route_table_association` consists of resetting
this original table as the Main Route Table for the VPC. You'll see this
additional Route Table in the AWS console; it must remain intact in order for
the `main_route_table_association` delete to work properly.
3 changes: 2 additions & 1 deletion website/source/docs/providers/aws/r/vpc.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ The following attributes are exported:
* `enable_dns_support` - Whether or not the VPC has DNS support
* `enable_dns_hostnames` - Whether or not the VPC has DNS hostname support
* `main_route_table_id` - The ID of the main route table associated with
this VPC.
this VPC. Note that you can change a VPC's main route table by using an
[`aws_main_route_table_association`](/docs/providers/aws/r/main_route_table_assoc.html).
* `default_network_acl_id` - The ID of the network ACL created by default on VPC creation
* `default_security_group_id` - The ID of the security group created by default on VPC creation
4 changes: 4 additions & 0 deletions website/source/layouts/aws.erb
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,10 @@
<a href="/docs/providers/aws/r/launch_config.html">aws_launch_configuration</a>
</li>

<li<%= sidebar_current("docs-aws-resource-main-route-table-assoc") %>>
<a href="/docs/providers/aws/r/main_route_table_assoc.html">aws_main_route_table_association</a>
</li>

<li<%= sidebar_current("docs-aws-resource-network-acl") %>>
<a href="/docs/providers/aws/r/network_acl.html">aws_network_acl</a>
</li>
Expand Down

0 comments on commit f852a01

Please sign in to comment.