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

Fix nat_gateway_enabled=false Invalid index error #48

Closed

Conversation

paulrob-100
Copy link
Contributor

@paulrob-100 paulrob-100 commented Apr 27, 2021

what

why

  • Users should be able to create subnets without NAT gateways

references

Paul Robinson added 4 commits April 26, 2021 19:03
* Retains the output_map AZ => null design choice
* Avoid aws_route ExactlyOne error by explicitly filtering out null ngw_ids in private.tf
* Perhaps better to output empty map instead
…til apply when nat_gateway_enabled=true

* Filtering the map for non null causes the error
* Replace output_map AZ => null design choice with empty map
@paulrob-100 paulrob-100 requested review from a team as code owners April 27, 2021 12:40
@paulrob-100 paulrob-100 requested review from adamcrews and SweetOps and removed request for a team April 27, 2021 12:40
@paulrob-100
Copy link
Contributor Author

@Nuru resubmitted as per description. I kept the tests in the us-east-2 region as advised in #45
I couldn't see a way to keep the mapping to null, but if you can please update. Thanks

@Gowiem Gowiem requested a review from Nuru May 1, 2021 18:40
Copy link
Contributor

@Nuru Nuru left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for this submission, once again, @paulrob-100

We are not going to support the use case of private subnets without NAT gateways, at least not in this module.

I have a bunch if stylistic issues with this PR, but rather than bother you with them, I am going to try to fix this issue in a new PR, taking this PR as inspiration. I hope you don't mind.

@paulrob-100
Copy link
Contributor Author

Thanks again for your review and fix @Nuru.
I'm just checking the new implementation.

Private subnets without routes to NAT gateways are going to be reasonably common especially considering the more modern network architectures permitted by the gateway load balancer.

Certainly it was one of the reasons I selected this module.

I'll perhaps join your sweetops slack group to see if I can find any more context behind this decision.

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

Successfully merging this pull request may close these issues.

Setting the nat_gateway_enabled=false results in Invalid index error
2 participants