-
-
Notifications
You must be signed in to change notification settings - Fork 95
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
fix: use filtered subnet cidr blocks instead of the VPC cidr #83
Conversation
/terratest |
@hans-d any plans to merge this? the test failure doesn't seem to be related with my change, as I see the same test failin in other PRs as well: https://github.com/cloudposse/actions/actions/runs/8132588929/job/22223186662 |
Unfortunately, I cannot bypass this check. Getting some internal visability on these failing tests as well, as they are now popping up in various places (for various different reasons). |
@joe-niland @dotCipher Hi! What can I do to have this reviewed? Thank you |
@goruha just fixed format that was failing. Can you check if the PR is ok to merge? thank you |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@bmbferreira why do not we have ?
data "aws_subnet" "requester" {
accepter_cidr_block_associations
instead of the VPC cidr
accepter_cidr_block_associations
instead of the VPC cidr… instead of the VPC cidr
Fixed. I applied the same logic to the requester as well. I also did an improvement to fallback to the VPC cidr if no tag filters are passed as inputs. I think it only makes sense to use the filtered subnet cidr blocks if we are actually filtering it. If not we can continue using the vpc cidr. WDYT? |
@bmbferreira I have one request for change. |
/terratest |
Co-authored-by: Igor Rodionov <[email protected]>
@goruha done! |
/terratest |
@bmbferreira Thanks for your contribution |
/terratest |
These changes were released in v1.0.0. |
what
This PR changes the module to start using the filtered subnet cidrs to create the routes, instead of using the whole VPC cidr.
why
Currently even when filtering the accepter or requester subnets by tags, the route table on the requester/accepter side is always created to the vpc cidr and doesn't create individual routes for each filtered subnet. This is not flexible enough as we might need for example peering to two different VPCs with overlapping CIDRs and we might want to use the subnet cidrs to be able to route to individual cidrs within the subnet, dodging the VPC cidr overlapping.
references