-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvpc.tf
46 lines (37 loc) · 1.03 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
# Create VPC Terraform Module
module "vpc" {
source = "terraform-aws-modules/vpc/aws"
version = "3.14.2"
# version = "~> 3.14"
# VPC Basic Details
name = "vpc-dev"
cidr = "10.0.0.0/16"
azs = ["ap-south-1a", "ap-south-1b"]
private_subnets = ["10.0.1.0/24", "10.0.2.0/24"]
public_subnets = ["10.0.101.0/24", "10.0.102.0/24"]
# Database Subnets
create_database_subnet_group = true
create_database_subnet_route_table= true
database_subnets = ["10.0.151.0/24", "10.0.152.0/24"]
#create_database_nat_gateway_route = true
#create_database_internet_gateway_route = true
# NAT Gateways - Outbound Communication
enable_nat_gateway = true
single_nat_gateway = true
# VPC DNS Parameters
enable_dns_hostnames = true
enable_dns_support = true
public_subnet_tags = {
Type = "public-subnets"
}
private_subnet_tags = {
Type = "private-subnets"
}
database_subnet_tags = {
Type = "database-subnets"
}
tags = {
Owner = "Nithin"
Environment = "vpc-test"
}
}