Terraform Plan Shows Changes, but State File Comparison Shows No Drift

I’m running into a situation where terraform plan reports that certain infrastructure resources need to be updated. But when I compare the live infrastructure with the state file, there are no visible differences. The resources appear to be in sync, yet Terraform still wants to modify them.

I’m trying to understand why this mismatch is happening and how to troubleshoot it. Any guidance on what could trigger this behaviour or what I should check next would be really helpful.

Hi @prem.kiran,

Without any information it’s hard to offer suggestions. The plan contains all the information Terraform is working with, and should show the before and after values for any planned change. If you suspect there are changes in the infrastructure, using terraform plan -refresh-only will show only differences between the last known state and the current infrastructure state. If you want more detail from the plan, you can extract all the data from the plan with terraform show -json planfile.