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(vpc) order subnets with array to avoid unexpected destroy/recreate when only adding subnets #43

Merged

Conversation

dduportal
Copy link
Contributor

@dduportal dduportal commented Nov 27, 2024

Related to jenkins-infra/helpdesk#4319

Fixup of #36 to avoid #32 deployment failure

#36 did introduce a new data structure to declare subnets with automatic CIDR calculation.
Alas I used a for iteration to pass the data from the locals to the vpc module, which used lexicographic order.
So adding a new subnets in the data structure had the effect to expect a destroy-recreate (as it inserted eks2 between the 2 existing subnets instead of after).

This PR switches the data structure to an array which order is kept by the iteration.

…e when only adding subnets

Signed-off-by: Damien Duportal <[email protected]>
@dduportal
Copy link
Contributor Author

Plan: 18 to add, 7 to change, 0 to destroy.

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.

1 participant