UPD: use of cidrsubnets

This commit is contained in:
xpk 2020-07-23 09:02:47 +08:00
parent bf06560319
commit 22013943d7
Signed by: xpk
GPG Key ID: CD4FF6793F09AB86

View File

@ -17,8 +17,8 @@ module "vpc" {
name = "demo-vpc-${random_integer.suffix.result}"
cidr = "172.16.0.0/16"
azs = data.aws_availability_zones.available.names
private_subnets = ["172.16.1.0/24", "172.16.2.0/24", "172.16.3.0/24"]
public_subnets = ["172.16.4.0/24", "172.16.5.0/24", "172.16.6.0/24"]
private_subnets = cidrsubnets("172.16.18.0/23", 1, 1)
public_subnets = cidrsubnets("172.16.20.0/23", 1, 1)
enable_nat_gateway = true
single_nat_gateway = true
enable_dns_hostnames = true
@ -26,6 +26,9 @@ module "vpc" {
tags = {
"owner" = "KF"
"terraform" = "initial-deployment-only"
"environment" = "demo"
"project" = "project1"
"application" = "network"
}
}