forked from ykhemani/terraform-aws-foundation
-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.tf
39 lines (34 loc) · 820 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
terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = "> 3.38"
}
}
required_version = ">= 1.0"
}
locals {
tags = merge(
var.global_tags,
var.local_tags
)
}
provider "aws" {
region = var.region
default_tags {
tags = local.tags
}
}
module "vpc" {
source = "terraform-aws-modules/vpc/aws"
version = "3.11.0"
name = "${var.prefix}-vpc"
cidr = var.vpc_cidr
azs = ["${var.region}a", "${var.region}b", "${var.region}c"]
private_subnets = var.private_subnets
public_subnets = var.public_subnets
enable_nat_gateway = var.enable_nat_gateway
single_nat_gateway = var.single_nat_gateway
one_nat_gateway_per_az = var.one_nat_gateway_per_az
enable_dns_hostnames = var.enable_dns_hostnames
}