-
-
Notifications
You must be signed in to change notification settings - Fork 10
/
main.tf
57 lines (42 loc) · 1.03 KB
/
main.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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
provider "aws" {
region = "us-east-1"
}
data "aws_vpc" "default" {
default = true
}
data "aws_subnets" "default" {
filter {
name = "vpc-id"
values = [data.aws_vpc.default.id]
}
}
###################################################
# Elastic IP
###################################################
module "elastic_ip" {
source = "tedilabs/ipam/aws//modules/elastic-ip"
version = "~> 0.3.0"
name = "nat-gw-public"
type = "AMAZON"
tags = {
"project" = "terraform-aws-network-examples"
}
}
###################################################
# Public NAT Gateway
###################################################
module "nat_gateway" {
source = "../../modules/nat-gateway"
# source = "tedilabs/network/aws//modules/nat-gateway"
# version = "~> 0.2.0"
name = "test/az1"
is_private = false
subnet = data.aws_subnets.default.ids[0]
## Primary IP Address
primary_ip_assignment = {
elastic_ip = module.elastic_ip.id
}
tags = {
"project" = "terraform-aws-network-examples"
}
}