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

Filtering local zones during VPC setup #211

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

gjmveloso
Copy link
Member

What does this PR do?

I tried to run the Terraform bootstrap in us-west-2 where I previously have the Los Angeles local zones enabled and received the following error during terraform apply:

Error: creating EC2 NAT Gateway: operation error EC2: CreateNatGateway, https response error StatusCode: 400, RequestID: 30d3fb07-1962-493b-a53e-fe93219bc456, api error OperationNotPermitted: Primary elastic IP and subnet belong in different network border groups.

Reviewing the VPC module code I found we're not filtering local zones AZs which would make the code to break as NAT Gateways are not supported in all local zones at this time and we're using single_nat_gateway = true as well.

Motivation

Keeping the Terraform bootstrap code to work as is, regardless of the eventual opted-in local zones.

More

  • Yes, I have tested the PR using my local account setup (Provide any test evidence report under Additional Notes)

  • Yes, I have added a new example under examples to support my PR

  • Yes, I have updated the docs for this feature

  • Yes, I have linked to an issue or feature request (applicable to PRs that solves a bug or a feature request). Fix [Bug]: Terraform bootstrap fails if local zones are enabled #210

Note:

  • Not all the PRs require examples and docs
  • We prefer small, well tested pull requests. Please ensure your pull requests are self-contained, and commits are squashed

For Moderators

  • E2E Test successfully complete before merge?

Additional Notes

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.

[Bug]: Terraform bootstrap fails if local zones are enabled
1 participant