Diagnose: Bicep what-if shows Delete on a resource you did not intend to remove
SYMPTOM
Bicep what-if shows Delete on a resource you did not intend to remove
CAUSE
What-if Delete lines mean the template no longer declares a resource that exists - usually because deployment mode is Complete, or the resource moved modules/renamed and the template treats it as new-plus-old.
CONFIRM IT
CONFIRM: check the deployment command for `--mode Complete` (Incremental is the default and never deletes). Check whether the resource was renamed in the template - rename = delete + create to ARM.
FIX
FIX: switch to Incremental mode unless you truly want Complete; restore the resource declaration or pin the rename as a deliberate migration with backup. Never proceed past an unexpected Delete line - what-if is the last guardrail before data loss.
VERIFY
VERIFY: re-run what-if: no Delete lines except the ones you intend; then deploy.