After running `terraform state mv` to rename a resource, the resource's state binding is lost and the resource cannot be managed. Which command should be run to restore the state binding?
After terraform state mv renames a resource in the state, the provider might lose its ability to correctly identify the corresponding remote object if the underlying resource ID or its lookup mechanism changes. terraform import allows you to explicitly tell Terraform to bring an existing remote resource, identified by its actual cloud provider ID, under management for a specific resource block in your configuration. This effectively re-establishes the binding by creating a new, correct state entry that links the configuration to the live infrastructure.
Why this answer
After a failed `terraform state mv`, the resource mapping in the state may become corrupted or lost. To restore the binding, use `terraform import` to re-import the existing resource into the state. Option E, `terraform import`, is correct.
Option D, `terraform refresh`, updates the state to match real infrastructure but does not restore a missing resource binding.