Skip to content

Instantly share code, notes, and snippets.

@ben-x
Created August 25, 2024 19:45
Show Gist options
  • Save ben-x/91eb7e3b4ebe4ed2ba2ac18664aa63be to your computer and use it in GitHub Desktop.
Save ben-x/91eb7e3b4ebe4ed2ba2ac18664aa63be to your computer and use it in GitHub Desktop.
vpc in secondary region. Part of multi-region-with-single-workload project
resource "aws_vpc" "main" {
cidr_block = var.cidr_blocks.vpc
enable_dns_support = true
enable_dns_hostnames = true
tags = merge(
var.tags,
{
"Name" = "vpc-eu-central-1"
}
)
}
module "private_subnet" {
source = "../../../common-modules/aws-vpc-subnet"
aws_region = var.aws_region
cidr_blocks = var.cidr_blocks.private_subnet
name = "private-subnet"
tags = var.tags
vpc = aws_vpc.main
}
module "public_subnet" {
source = "../../../common-modules/aws-vpc-subnet"
aws_region = var.aws_region
cidr_blocks = var.cidr_blocks.public_subnet
name = "public-subnet"
tags = var.tags
vpc = aws_vpc.main
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment