Skip to content

feat: Add enable_public_igw_route flag to optionally create public route tables to internet gateway #1122

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

Conversation

pjaudiomv
Copy link
Contributor

@pjaudiomv pjaudiomv commented Sep 27, 2024

Description

Add enable_public_igw_route flag to optionally create public route tables to internet gateway

Motivation and Context

It can be desirable to have both an internet gateway and want to alter the default routes for public subnets through either using vpc endpoints (gwlb) or transit gateways. Offering this simple flag offers flexibility and enables someone to output the public route table ids and add any routes they want, rather than prescribing to specific use cases.

This cant be inside the VPC module because the endpoints are created outside of it and use the private subnets so it would create a circular dependency. By adding enable_public_igw_route flag. it allows someone to alter these routes if wanted.

Example (pseudo)

resource "aws_route" "public_vpce_route" {
  for_each                       = aws_vpc_endpoint.gwlb
  route_table_id              = local.public_rtbl_to_subnet_id_map[each.key]
  destination_cidr_block = "0.0.0.0/0"
  vpc_endpoint_id           = each.value.id
}

Breaking Changes

This is fully backwards compatible and does not introduce any breaking changes.

How Has This Been Tested?

  • I have updated at least one of the examples/* to demonstrate and validate my change(s)
  • I have tested and validated these changes using one or more of the provided examples/* projects
  • I have executed pre-commit run -a on my pull request

Copy link

This PR has been automatically marked as stale because it has been open 30 days
with no activity. Remove stale label or comment or this PR will be closed in 10 days

@github-actions github-actions bot added the stale label Oct 29, 2024
@github-actions github-actions bot removed the stale label Oct 30, 2024
Copy link

github-actions bot commented Dec 5, 2024

This PR has been automatically marked as stale because it has been open 30 days
with no activity. Remove stale label or comment or this PR will be closed in 10 days

@github-actions github-actions bot added the stale label Dec 5, 2024
Copy link

This PR was automatically closed because of stale in 10 days

@github-actions github-actions bot closed this Dec 15, 2024
Copy link

I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 14, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant