refresh-only plan

A Terraform plan mode that reads the real resources and shows how they differ from state, without proposing to change them.

In more detail

Every normal plan also refreshes first, which is how drift appears. A refresh-only plan shows drift on its own so you can decide to revert or adopt it.

Examples

terraform plan -refresh-only
In Terraform: Run terraform plan -refresh-only to see what changed outside Terraform, then apply -refresh-only to accept those values into state. It replaced the older terraform refresh command, which updated state without showing you anything first.

Related terms

Taught in

References

Certification courses