Interview Prep/Terraform/State Internals

When do you use `terraform state rm`?

IntermediateConceptState Internals
Answer

To make Terraform forget a resource without destroying it, for example when handing ownership to another stack or removing a resource that was already deleted by hand. The real object remains and is no longer managed. In Terraform 1.7+ a removed block does the same declaratively.

All Terraform questions Roadmap: Terraform in production

More on State Internals