terraform-aws-modules / terraform-aws-vpc

Terraform module to create AWS VPC resources πŸ‡ΊπŸ‡¦
https://registry.terraform.io/modules/terraform-aws-modules/vpc/aws
Apache License 2.0
2.98k stars 4.44k forks source link

flag to create dedicated route table for public subnets and intra subnets #929

Closed arongate closed 12 months ago

arongate commented 1 year ago

Is your request related to a new offering from AWS? No πŸ›‘

Is this functionality available in the AWS provider for Terraform? See CHANGELOG.md, too. Yes βœ…:

Is your request related to a problem? Please describe.

when we have multi subnets one for each availability zone, we actually can't configure routing scope in a the same availability zone as two public or intra subnets will shared the same route table

Describe the solution you'd like.

add flag to create dedicated route table for each subnets. Something like intra_dedicated_route_table or public_dedicated_route_table. These variable will defaults to false for backward compatibility reason.

Describe alternatives you've considered.

Not using the module.

Additional context

Empty

github-actions[bot] commented 1 year ago

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

lnkrishnan commented 1 year ago

+1

github-actions[bot] commented 1 year ago

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

arongate commented 1 year ago

+1 up.

sephross commented 1 year ago

Same issue here - is there a work around for this for the time being?

gpetras commented 1 year ago

Yep, I was able to do the following to work around this issue for all of the subnet types (public, private, database) by doing this:

resource "aws_route" "vpn_client_route" {
  route_table_id         = element(module.vpc.private_route_table_ids, count.index)
  destination_cidr_block = "10.0.0.0/24"
  transit_gateway_id     = <transit gateway id>
}
rohanvivek commented 1 year ago

+1

rohanvivek commented 1 year ago

Same issue here - is there a work around for this for the time being?

Did you get any solution to this?

github-actions[bot] commented 1 year ago

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

atsikham commented 1 year ago

All,

as a workaround, you can move the necessary resources (subnets, route tables, associations) outside the module and control them yourself: https://developer.hashicorp.com/terraform/tutorials/configuration-language/move-config

github-actions[bot] commented 1 year ago

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

arongate commented 1 year ago

+1

github-actions[bot] commented 1 year ago

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

github-actions[bot] commented 12 months ago

This issue was automatically closed because of stale in 10 days

github-actions[bot] commented 11 months ago

I'm going to lock this issue 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 similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.