Move resource in state

Rename/reorganize resource without destroying and recreating it

terraform state mv old.address new.address

tool
terraform43 commands
tags
terraform

More terraform commands

  • terraform workspace list

    Show all workspaces; current one marked with *

  • terraform workspace new staging && terraform workspace select staging

    Create a new workspace and switch to it

  • terraform validate

    Check Terraform configuration for syntax and consistency errors

  • terraform fmt -recursive

    Auto-format all .tf files recursively

  • terraform output -json

    Print all outputs as JSON; useful for pipeline scripting

all 43 terraform commands