You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- infra/modules/keyvault.bicep: enablePurgeProtection now parameterized (default true, null when false to avoid setting the irreversible flag).
- infra/main.bicep: pass enablePurgeProtection=false for environmentName starting with 'dev' so iterative dev deploys can hard-delete the vault.
- infra/modules/appconfig.bicep: keep disableLocalAuth=false during initial provision (MI workloads still use Entra RBAC). Pass-through auth was blocked by tenant Conditional Access (Forbidden on data-plane writes even with App Configuration Data Owner). Documented inline.
- Deploy-Azure.ps1: query each ARM output individually with the ARM-normalized lowercase-prefix-but-keep-last-upper name (AZURE_LOCATION -> azurE_LOCATION, FUNCTIONS_URI -> functionS_URI, etc.). PSObject-based parsing was unreliable inside the script's pipeline context.
- docs/AZURE-DEPLOY.md: troubleshooting table updated with the 4 issues discovered during this run.
End-to-end verified: 33 resources Provisioned in italynorth, Function App + Web App returning HTTP 200, App Configuration seeded with 9 keys + 1 feature flag, KV secret 'sql-connection-string' written.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copy file name to clipboardExpand all lines: docs/AZURE-DEPLOY.md
+11-1Lines changed: 11 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -115,7 +115,17 @@ Entrambi i percorsi sono supportati. **`azure.yaml` è mantenuto** per chi prefe
115
115
| Errore | Causa probabile | Soluzione |
116
116
|--------|-----------------|-----------|
117
117
|`Authorization_RequestDenied` su `signed-in-user`| L'utente non ha permessi per leggere il suo profilo Graph |`az ad signed-in-user show` deve funzionare; in alternativa, passare `-SqlAdminPrincipalId <object-id>` esplicitamente |
118
-
|`VaultAlreadyExists` su redeploy | Il nome del KV in soft-delete | Esegui `az keyvault purge --name <kv-name> --location <location>`|
118
+
|`VaultAlreadyExists` su redeploy | Il nome del KV in soft-delete | Esegui `az keyvault purge --name <kv-name> --location <location>`. Se la subscription **vieta DeletedVaultPurge** (tipico delle MCAPS sandbox), cambia `-EnvironmentName` per ottenere un `resourceToken` nuovo (es. `dev` → `dev2`)|
119
119
|`RoleAssignmentExists`| Re-deploy dopo cambio di tenant | Cancella manualmente i role assignment in conflitto, oppure cambia il `resourceToken` (rinominare environment) |
120
+
| App Configuration `keyValues` falliscono con `Forbidden` / *"local authentication is disabled"*|`disableLocalAuth=true` impedisce ad ARM di scrivere le seed key, e su molti tenant la modalità *Pass-through* è bloccata da Conditional Access | Nel Bicep tenere `disableLocalAuth: false` durante il provision iniziale (le MI usano comunque RBAC Entra). Disabilitare le local key in un secondo step post-deploy con `az appconfig update --disable-local-auth true` quando le seed sono complete |
121
+
| Key Vault `EnablePurgeProtectionRequired`|`enablePurgeProtection: true` è **irreversibile** una volta impostato | Per ambienti dev, in `main.bicep` la flag viene passata come `!startsWith(environmentName, 'dev')` → off per `dev*`, on per `prod*`. NON metterla a `true` finché non sei pronto a vivere con la protezione |
120
122
|`BadRequest` su SQL `azureADOnlyAuthentication: true`| L'utente AAD admin non è risolvibile | Verifica che `-SqlAdminPrincipalId` punti a un utente o gruppo Entra ID esistente nel **medesimo tenant** della subscription |
121
123
| What-if mostra molti `Unsupported (Diagnostics)`| Normale: role assignment dipende da MI principalId calcolato a runtime | Ignorabile; il deploy reale risolve correttamente |
124
+
|`Function App zip deploy failed.` con `--resource-group` vuoto | Bug nel parsing degli output ARM dello script (storico) | Risolto in commit successivo: ARM normalizza i nomi output (es. `AZURE_RESOURCE_GROUP` → `azurE_RESOURCE_GROUP`); lo script ora ricostruisce il nome ARM esatto prima di interrogare ogni output via `az deployment sub show --query`|
125
+
126
+
### Idempotenza e ri-deploy
127
+
128
+
- Lo script è completamente idempotente: rilanciarlo sullo stesso `EnvironmentName` aggiorna (non ricrea) le risorse.
129
+
- Per ripartire da zero su un ambiente, fai prima `az group delete -n rg-blkmon-<env>-<location> --yes` e poi rilancia.
130
+
-**Attenzione**: KV e App Configuration entrano in soft-delete; se nel tenant non puoi `purge`, cambia `-EnvironmentName` per ottenere un nuovo `resourceToken`.
Copy file name to clipboardExpand all lines: infra/modules/keyvault.bicep
+3-1Lines changed: 3 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -6,6 +6,8 @@ param tenantId string
6
6
paramdeployerPrincipalIdstring
7
7
@description('Object IDs of workload identities (web, func) that need wrapKey/unwrapKey for the KEK and Get for secrets resolved via App Configuration KV-references.')
8
8
paramconsumerPrincipalIdsarray
9
+
@description('Enable purge protection. Once enabled, CANNOT be disabled. Keep true for prod, set false for ephemeral dev environments.')
0 commit comments