summaryrefslogtreecommitdiffstats
path: root/route_tables.tf
diff options
context:
space:
mode:
authorSpike <avlampson+git@gmail.com>2019-04-07 22:03:31 +0100
committerSpike <avlampson+git@gmail.com>2019-04-07 22:03:31 +0100
commitbb81085619769aca861ab5d5bbff86f71c9435d2 (patch)
tree80b45de34d9f0647c10e6d6fae5b408c21c190c5 /route_tables.tf
downloadfundapp_demo-master.zip
fundapp_demo-master.tar.gz
fundapp_demo-master.tar.bz2
Autoscaling Group, and associated controls and configsHEADmaster
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}"
+}