Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

More specific name for main IGW? #156

Open
jonchun opened this issue Aug 24, 2024 · 0 comments
Open

More specific name for main IGW? #156

jonchun opened this issue Aug 24, 2024 · 0 comments

Comments

@jonchun
Copy link

jonchun commented Aug 24, 2024

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.

@jonchun jonchun mentioned this issue Aug 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant