Reputation: 335
I'm uncertain of how terraform is supposed to behave in this scenario:
In my mind, the ami shouldn't be needed any longer in order to destroy a cluster - the instance already exists, and so terraform should destroy the cluster.
Perhaps there is a work-around here? Or should I file an issue?
Upvotes: 0
Views: 921
Reputation: 74694
By default Terraform refreshes all resources before taking any actions to ensure that it is working from the most up-to-date record of the state of the world.
In situations where this is not suitable -- such as the one you've described here -- this behavior can be disabled by passing the option -refresh=false
to the terraform destroy
command. In this case, Terraform will use the values already saved in the state from a previous run, skipping the "refresh" step that would normally update them.
Upvotes: 4