summaryrefslogtreecommitdiffstats
path: root/route_tables.tf
diff options
context:
space:
mode:
Diffstat (limited to 'route_tables.tf')
-rw-r--r--route_tables.tf22
1 files changed, 22 insertions, 0 deletions
diff --git a/route_tables.tf b/route_tables.tf
new file mode 100644
index 0000000..c4ead17
--- /dev/null
+++ b/route_tables.tf
@@ -0,0 +1,22 @@
+# Public route table
+resource "aws_route" "fundapp_demo_public_route_table" {
+ route_table_id = "${aws_vpc.fundapp_demo_vpc.main_route_table_id}"
+ destination_cidr_block = "0.0.0.0/0"
+ gateway_id = "${aws_internet_gateway.fundapp_demo_aws_igw.id}"
+}
+
+# Public route table associations
+resource "aws_route_table_association" "vpc_pub_net_association_az1" {
+ subnet_id = "${aws_subnet.public_1.id}"
+ route_table_id = "${aws_vpc.fundapp_demo_vpc.main_route_table_id}"
+}
+
+resource "aws_route_table_association" "vpc_pub_net_association_az2" {
+ subnet_id = "${aws_subnet.public_2.id}"
+ route_table_id = "${aws_vpc.fundapp_demo_vpc.main_route_table_id}"
+}
+
+resource "aws_route_table_association" "vpc_pub_net_association_az2" {
+ subnet_id = "${aws_subnet.public_2.id}"
+ route_table_id = "${aws_vpc.fundapp_demo_vpc.main_route_table_id}"
+}