vpc.tf 561 B

123456789101112131415161718192021
  1. module "vpc" {
  2. source = "terraform-aws-modules/vpc/aws"
  3. version = "3.11.2"
  4. name = "vpc-${local.environment}"
  5. cidr = "10.0.0.0/16"
  6. azs = ["${local.aws_region}a", "${local.aws_region}b", "${local.aws_region}c"]
  7. private_subnets = ["10.0.1.0/24", "10.0.2.0/24", "10.0.3.0/24"]
  8. public_subnets = ["10.0.101.0/24", "10.0.102.0/24", "10.0.103.0/24"]
  9. enable_dns_hostnames = true
  10. enable_nat_gateway = true
  11. map_public_ip_on_launch = false
  12. single_nat_gateway = true
  13. tags = {
  14. Environment = local.environment
  15. }
  16. }