Terraform Renaming Is Not Cosmetic

Most engineers assume renaming a Terraform resource is harmless.

It is not.

Terraform does not track infrastructure by the visible AWS name.
It tracks infrastructure by the resource address stored in the state file.

When you rename a resource in code, you change its identity.
Terraform interprets that identity break as one object being destroyed and another being created.

Even if the underlying cloud resource is identical.

That means a simple refactor can trigger a replacement.
On stateful resources, replacement can rotate IDs, break dependencies, or cause downtime.

The correct solution is not “be careful.”
The solution is to move identity deliberately.

If you work in production environments, this is not a cosmetic detail.
It is an operational control point.