---
title: "Discussion on \"Terraform surgery: safely rename resources without destroying them\" | Hashnode"
description: "Discussion on \"Terraform surgery: safely rename resources without destroying them\". TLDR; Use the moved { ... } Terraform block whenever possible. Otherwise use the `terraform state mv` command as a last resort."
url: "https://hashnode.com/posts/terraform-renaming-resources-moved-block/6590336b7de5fc632483fb40"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Terraform surgery: safely rename resources without destroying them](https://calebfaruki.me/terraform-renaming-resources-moved-block?utm_source=hashnode&utm_medium=feed)

TLDR; Use the moved { ... } Terraform block whenever possible. Otherwise use the \`terraform state mv\` command as a last resort.

Dec 30, 2023 · 8 min read · calebfaruki.me  
Updated Jan 4, 2024  
Read the article

-   [#terraform](https://hashnode.com/tag/terraform)
-   [#infrastructure-as-code](https://hashnode.com/tag/infrastructure-as-code)

## Written by

[Caleb Faruki](https://hashnode.com/@calebfaruki)

@calebfaruki · Paris, France

  
[View profile](https://hashnode.com/@calebfaruki)

Kleb works

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
