-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathnatgw-eip-a.tf
34 lines (33 loc) · 906 Bytes
/
natgw-eip-a.tf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# this is an example if you need to get private items to talk to the internet
#!# resource "aws_eip" "natgw-a" {
#!# vpc = true
#!# }
#!#
#!# resource "aws_nat_gateway" "natgw-a" {
#!# allocation_id = "${aws_eip.natgw-a.id}"
#!# subnet_id = "${aws_subnet.private-a.id}"
#!#
#!# tags {
#!# Name = "${var.tag_prefix}-natgw-a"
#!# }
#!# }
#!#
#!# resource "aws_route_table" "az-a" {
#!# vpc_id = "${aws_vpc.the_vpc.id}"
#!#
#!# tags {
#!# Name = "${var.tag_prefix}-rt-natgw-a"
#!# }
#!# }
#!#
#!# resource "aws_route" "nategw-a" {
#!# route_table_id = "${aws_route_table.az-a.id}"
#!# destination_cidr_block = "0.0.0.0/0"
#!# nat_gateway_id = "${aws_nat_gateway.natgw-a.id}"
#!# }
#!#
#!# resource "aws_route_table_association" "private-a" {
#!# subnet_id = "${aws_subnet.private-a.id}"
#!#
#!# route_table_id = "${aws_route_table.az-a.id}"
#!# }