Make it possible to state rm
certain resources during destroy
via the lifecycle{}
block
#34679
Labels
state rm
certain resources during destroy
via the lifecycle{}
block
#34679
Terraform Version
All || N/A
Use Cases
The core idea is to create a way to tell Terraform to remove a resource from the state file during a
destroy
workflow instead of contacting the owning API to delete the object.This would make it possible to handle nested objects, like
kubernetes_namespace
resources, that exist inside a Kubernetes cluster, which you will destroy in the same workflow, but you do not need Terraform to remove via the owning API.Attempted Solutions
Hashicorp would recommend that people use a single Terraform workflow to spin up a k8s cluster and then install things into that cluster in another Terraform workflow.
However, there are many times that at least some bootstrapping will occur in the initial Terraform workflow. This fix would allow users to quickly identify resources that need not be destroyed via their API.
Proposal
References
No response
The text was updated successfully, but these errors were encountered: