-
Notifications
You must be signed in to change notification settings - Fork 0
/
vpc.tf
67 lines (53 loc) · 1.63 KB
/
vpc.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
58
59
60
61
62
63
64
65
66
67
######################################################################
# Copyright (c) 2021 Claudio André <claudioandre.br at gmail.com>
#
# This program comes with ABSOLUTELY NO WARRANTY; express or implied.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, as expressed in version 2, seen at
# http://www.gnu.org/licenses/gpl-2.0.html
######################################################################
module "vpc" {
source = "terraform-aws-modules/vpc/aws"
name = "app-vpc"
cidr = "10.1.0.0/16"
azs = ["${local.region}a", "${local.region}b"]
private_subnets = ["10.1.1.0/24", "10.1.2.0/24"]
public_subnets = ["10.1.11.0/24", "10.1.12.0/24"]
database_subnets = ["10.1.21.0/24", "10.1.22.0/24"]
create_igw = true
map_public_ip_on_launch = true
create_database_subnet_route_table = true
tags = {
Environment = var.domain
"Application Role" = var.role
Owner = var.owner
Customer = var.customer
Confidentiality = var.confidentiality
}
vpc_tags = {
Name = "Directory-app-vpc"
}
igw_tags = {
Name = "Directory-app-igw"
}
public_subnet_tags = {
Name = "Public Subnet"
}
private_subnet_tags = {
Name = "Private Subnet"
}
database_subnet_tags = {
Name = "app-DB-Subnet"
}
private_route_table_tags = {
Name = "app-routetable-private"
}
public_route_table_tags = {
Name = "app-routetable-public"
}
database_route_table_tags = {
Name = "app-routetable-DB"
}
}