terraform-aws-vpc
terraform-aws-vpc copied to clipboard
More specific name for main IGW?
Not sure if this is just my preference but ran into an issue where one of our less experienced engineers got a little bit confused at the deployed VPC configuration because the IGW was named exactly the same as the vpc.
# Internet gateway (if public subnets are created)
resource "aws_internet_gateway" "main" {
count = contains(local.subnet_keys, "public") ? 1 : 0
vpc_id = local.vpc.id
tags = merge(
{ Name = var.name },
module.tags.tags_aws,
try(module.subnet_tags["public"].tags_aws, {})
)
}
I think { Name = "${var.name}-igw" } would add clarity and prevent any potential confusion.