Pcornel
Automation · Idempotency

Update-if-Different

Cheat sheet · https://pcornel.dk/topic.php?topic=6000

Back to the Topic

Answer

Update-if-different changes a resource only when its current properties differ from the desired ones, reporting exactly what changed, instead of rewriting it on every run.

Remember

  • Compare each property with the desired value.
  • Update only what differs.
  • Report exactly what changed.

First checks

  • Compare fields before update — diff
  • Update only changed fields (PATCH) — minimal change
  • Report changed=true only when updated — accuracy

Verify in this order

current vs desired → different? update : no-op

Where it usually breaks

Input/desired state → request accepted → job/task terminal status → target object read-back → effective runtime state → original workload → regression/rollback readiness.

Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=6000

Confirmation

Confirm action

Continue?