Terraform moved block behavior when renaming a resource and changing its arguments
26.5K reputation · 05 Jun 2021, 18:54 UTC
Goal: use Terraform moved block to rename a resource while also updating its arguments (e.g., tags) without triggering a delete‑create replace that could cause downtime.
Constraint: the moved block guarantees a move action only when the resource type and provider stay the same and no ID‑changing arguments are modified; however, Terraform’s documentation does not clearly specify which argument changes are considered ID‑influencing for each provider/resource type, leaving uncertainty about whether a concurrent argument edit will still result in a replace.
Questions: Does any argument change alongside a moved block force a replace? Which arguments are treated as ID‑influencing for a given resource? Can non‑ID arguments be safely changed together with a moved block to preserve zero‑downtime?