-
-
Notifications
You must be signed in to change notification settings - Fork 4.5k
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
VPC Expansion via secondary_cidr_blocks is incorrectly destructive to original cidr subnets and route tables #178
Comments
Did you ever find a work-around for this issue? Just curious, I hit something similar to this and I'm considering just hard-coding the subnets (and route tables). In my research, this is just the nature of how count is handled: hashicorp/terraform#18767 As much as I hate copy/paste duplicative code, I'd prefer that over potential downtime. |
This issue has been automatically marked as stale because it has been open 30 days |
This issue was automatically closed because of stale in 10 days |
hi all, this should be addressed in the next version which is under development here https://github.com/clowdhaus/terraform-aws-vpc-v4 |
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. |
Steps to reproduce
Deploy a simple VPC with the following config.
Plan and apply this configuration to AWS. Once state is persisted and this exists on AWS, modify to this example
What is expected
The new CIDR ranges of 10.1.0.0/16 and 10.2.0.0/16 are allocated as new resources. Existing 10.0.0/16 ranges are not modified
What happens
The original CIDR of 10.0.0.0/16 and all subnets in AZs, as well as routing tables are destroyed and re-created. This destroys all running services within the VPC, due to the subnet changes. This causes lambdas that run within a VPC to fail to execute.
Acceptance Criteria
The above use case causes a non destructive expansion of the VPC. As the current module is implemented, it makes expansion impossible, since this is a destructive operation to the original CIDR. Note that when expanding via the AWS console, this behavior is not occurring.
The text was updated successfully, but these errors were encountered: