Created
August 25, 2024 19:45
-
-
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
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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