Interview Prep/Terraform/Plan Errors and Unexpected Replacements

Every plan shows `~ tags = { "LastUpdated" = "2026-11-08T10:00:00Z" -> (known after apply) }`.

BeginnerTroubleshootingPlan Errors and Unexpected Replacements
Answer

Likely causes → timestamp() (or uuid()) in tags or names; it's evaluated each run, so there's always a diff.

Diagnose → grep -rn -E 'timestamp\(\)|uuid\(\)' .

Fix → Remove it. If you need a creation time, use time_static from the time provider, which is stored once in state.

Prevent → Lint against non-deterministic functions in resource arguments.

All Terraform questions

More on Plan Errors and Unexpected Replacements