-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathvpc.tf
44 lines (35 loc) · 1.31 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
# ==============================================================================
# VPC, Subnets,
# ==============================================================================
// comment this and uncomment the all of selfnats.tf if you want to deploy your instance in a private subnet
module "vpc" {
source = "terraform-aws-modules/vpc/aws"
version = local.vpc_version
name = "my-website-vpc-${var.env}"
cidr = "10.0.0.0/16"
azs = ["af-south-1a", "af-south-1b"]
public_subnets = ["10.0.101.0/24", "10.0.102.0/24"]
enable_nat_gateway = false
enable_vpn_gateway = false
map_public_ip_on_launch = false
enable_dns_hostnames = true
tags = {
Environment = var.env
}
}
// this current one works with fcknats and your instance will be deployed to private subnet
# module "vpc" {
# source = "terraform-aws-modules/vpc/aws"
# version = local.vpc_version
# name = "my-website-vpc-${var.env}"
# cidr = "10.0.0.0/16"
# azs = ["us-east-1a", "us-east-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"]
# enable_nat_gateway = false
# enable_vpn_gateway = false
# enable_dns_hostnames = true
# tags = {
# Environment = var.env
# }
# }