Terraform Ep 13: Advanced State Manipulation (Surgical Refactoring)
·1004 words·5 mins
Refactoring HCL code is dangerous. If you rename a resource block, Terraform will attempt to destroy the old resource and recreate it. In this episode, we learn how to use ‘moved’ blocks and the state CLI to refactor code safely, preventing catastrophic database deletions.
