-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmain.tf
43 lines (37 loc) · 839 Bytes
/
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
terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = "3.32"
}
}
backend "s3" {
bucket = "<BUCKET-NAME>"
encrypt = "true"
key = "terraform.tfstate"
region = "us-east-1"
}
}
data "aws_region" "current" {}
module "vpc" {
source = "./modules/vpc"
enable_dns_hostnames = "true"
enable_dns_support = "true"
vpc_cidr = "10.0.0.0/16"
vpc_name = "${var.project_prefix}-${var.environment}-vpc"
availability_zones = {
"0" = var.availability_zone_1
"1" = var.availability_zone_2
"2" = var.availability_zone_3
}
subnets = {
"0" = "10.0.0.0/20"
"1" = "10.0.16.0/20"
"2" = "10.0.32.0/20"
}
private_subnets = {
"0" = "10.0.64.0/20"
"1" = "10.0.80.0/20"
"2" = "10.0.96.0/20"
}
}