**TL;DR:** 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- 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.

## The fix

SYMPTOM
Bicep what-if shows Delete on a resource you did not intend to remove

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.

## When to use this

- This covers exactly what the title says: Diagnose.
- You are setting this up for the first time, or auditing an existing setup.
- You want the key gotchas in one place before you start.

## When not to use this

- You are doing a different workflow with Diagnose; these steps are specific to the title above.
- You need the full reference docs; this is the short path, not the manual.

## Compatibility

- Not pinned to a specific version; follows current Diagnose behavior.

## Why it happens

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.

## Edge cases

- 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.