Summary
A manually deleted implicit Azure Key Vault can leave an Aspire app in a state where resource commands cannot fully recover without changing the AppHost model.
Observed flow
- A PostgreSQL resource uses password authentication, which creates an implicit child Key Vault resource.
- The Key Vault is manually deleted outside Aspire while provisioning state is incomplete or failed.
reprovision tries to recreate the same generated vault name.
- ARM returns a Key Vault
ConflictError saying the vault name already exists in deleted state and must be recovered or purged.
- Azure deleted-vault APIs and CLI do not find the deleted vault, so purge/recover cannot be performed.
- The Aspire
delete-azure-resource path cannot act on the child Key Vault because cached deployment state does not contain a usable resource ID.
Result
The only practical escape was to change the AppHost model so the resource generated a new Key Vault name, then restart the AppHost. That means the no-restart recovery story is incomplete for this edge case.
Expected behavior
Aspire should either provide a no-restart recovery path for this state or surface a clearer diagnostic explaining that the Azure provider reports a deleted-state name conflict but the deleted vault is not discoverable for purge/recover.
Notes
This issue intentionally omits subscription IDs, tenant IDs, local paths, generated vault names, and other environment-specific details.
Summary
A manually deleted implicit Azure Key Vault can leave an Aspire app in a state where resource commands cannot fully recover without changing the AppHost model.
Observed flow
reprovisiontries to recreate the same generated vault name.ConflictErrorsaying the vault name already exists in deleted state and must be recovered or purged.delete-azure-resourcepath cannot act on the child Key Vault because cached deployment state does not contain a usable resource ID.Result
The only practical escape was to change the AppHost model so the resource generated a new Key Vault name, then restart the AppHost. That means the no-restart recovery story is incomplete for this edge case.
Expected behavior
Aspire should either provide a no-restart recovery path for this state or surface a clearer diagnostic explaining that the Azure provider reports a deleted-state name conflict but the deleted vault is not discoverable for purge/recover.
Notes
This issue intentionally omits subscription IDs, tenant IDs, local paths, generated vault names, and other environment-specific details.