Skip to content

Destroying and re-creating dependent Terraform modules when their parent changes #8

Answered by zackproser
zackproser asked this question in Help
Discussion options

You must be logged in to vote

The best way to achieve this would be to set, for example, a name parameter in your child module (such as the worker_name_prefix) in our eks workers module) to the version of CNI - or something similar that will change everytime that CNI is deployed.

This way, Terraform will consider the name change a destructive and backward incompatible change, causing the dependent resources to be destroyed and re-created as you intend.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by zackproser
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
1 participant