forked from fstuck37/terraform-aws-vpc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinetgw.tf
21 lines (20 loc) · 895 Bytes
/
inetgw.tf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
##################################################
# File: inetgw.tf #
# Created Date: 03202019 #
# Author: Fred Stuck #
# Version: 0.1 #
# Description: Creates an Internet Gateway #
# #
# Change History: #
# 03202019: Initial File #
# #
##################################################
resource "aws_internet_gateway" "inet-gw" {
count = contains(keys(var.subnets), "pub") ? 1 : 0
vpc_id = aws_vpc.main_vpc.id
tags = merge(
var.tags,
map("Name",format("%s", "${var.name-vars["account"]}-${var.name-vars["name"]}-${replace(var.region,"-", "")}-igw" )),
local.resource-tags["aws_internet_gateway"]
)
}