Robertjam954/multimodal_rag_application / .claude/skills/azure-validate
azure-validate
VerifiedPre-deployment validation for Azure readiness. Run deep checks on configuration, infrastructure (Bicep or Terraform), RBAC role assignments, managed identity permissions, and prerequisites before deploying. WHEN: validate my app, check deployment readiness, run preflight checks, verify configuration, check if ready to deploy, validate azure.yaml, validate Bicep, test before deploying, troubleshoot deployment errors, validate Azure Functions, validate function app, validate serverless deployment, verify RBAC roles, check role assignments, review managed identity permissions, what-if analysis, validate Container Apps deployment.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 3.7 KB |
| references/aspire-functions-secrets.md | markdown | 3.6 KB |
| references/global-rules.md | markdown | 1.2 KB |
| references/policy-validation.md | markdown | 1.5 KB |
| references/recipes/README.md | markdown | 374 B |
| references/recipes/azcli/README.md | markdown | 2.2 KB |
| references/recipes/azcli/errors.md | markdown | 505 B |
| references/recipes/azd/README.md | markdown | 5.3 KB |
| references/recipes/azd/aspire.md | markdown | 2.9 KB |
| references/recipes/azd/environment.md | markdown | 1.9 KB |
| references/recipes/azd/errors.md | markdown | 2.6 KB |
| references/recipes/bicep/README.md | markdown | 1.9 KB |
| references/recipes/bicep/errors.md | markdown | 374 B |
| references/recipes/terraform/README.md | markdown | 3.3 KB |
| references/recipes/terraform/errors.md | markdown | 2.8 KB |
| references/region-availability.md | markdown | 3.0 KB |
| references/role-verification.md | markdown | 3.9 KB |
references/aspire-functions-secrets.md
View on GitHub# Aspire + Azure Functions: Secret Storage Validation
> ⚠️ **Pre-provisioning check** — Run this BEFORE `azd provision`.
## When This Applies
This check is required when **all** of these are true:
| Condition | How to detect |
|-----------|--------------|
| .NET Aspire project | `*.AppHost.csproj` exists or `Aspire.Hosting` package reference |
| Azure Functions component | `AddAzureFunctionsProject` call in `AppHost.cs` or `Program.cs` |
| Identity-based storage | `WithHostStorage` call (Aspire default) |
## Detection
Search for `AddAzureFunctionsProject` in the AppHost source file(s):
```bash
grep -rn "AddAzureFunctionsProject" . --include="*.cs"
```
**PowerShell:**
```powershell
Get-ChildItem -Recurse -Filter "*.cs" | Select-String "AddAzureFunctionsProject" -List
```
If found, check whether `AzureWebJobsSecretStorageType` is already configured in those same file(s):
```bash
# Check only the AppHost file(s) that contain AddAzureFunctionsProject
find . -name "*.cs" -path "*AppHost*" -print0 | xargs -0 grep -l "AddAzureFunctionsProject" 2>/dev/null | xargs grep -l "AzureWebJobsSecretStorageType"
```
**PowerShell:**
```powershell
Get-ChildItem -Recurse -Filter "*.cs" |
Where-Object { $_.FullName -match "AppHost" } |
Select-String "AddAzureFunctionsProject" -List |
ForEach-Object { Select-String "AzureWebJobsSecretStorageType" -Path $_.Path }
```
**If `AddAzureFunctionsProject` is present but `AzureWebJobsSecretStorageType` is NOT configured in the same file → fix is required.**
## Fix
Add `.WithEnvironment("AzureWebJobsSecretStorageType", "Files")` to the Azure Functions project builder chain in the AppHost source file that contains the `AddAzureFunctionsProject` call (often `Program.cs` in the `*.AppHost` project).
### Before
```csharp
var functions = builder.AddAzureFunctionsProject<Projects.MyFunctions>("functions")
.WithHostStorage(storage)
.WithReference(queues);
```
### After
```csharp
var functions = builder.AddAzureFunctionsProject<Projects.MyFunctions>("functions")
.WithHostStorage(storage)
.WithEnvironment("AzureWebJobsSecretStorageType", "Files")
.WithReference(queues);
```
> 💡 **Tip:** Place `.WithEnvironment(...)` immediately after `.WithHostStorage(...)` for clarity.
## Why This Is Required
Azure Functions needs storage for managing host secrets/keys (function keys, host keys, master key). By default, it stores them as blobs in the `AzureWebJobsStorage` account.
When Aspire configures identity-based storage access (via `WithHostStorage`), it sets URI-based environment variables like `AzureWebJobsStorage__blobServiceUri` instead of a connection string. The Functions runtime's secret manager does **not** support these identity-based URIs — it requires either a connection string or SAS token.
Setting `AzureWebJobsSecretStorageType=Files` switches the Functions host to file-system-based key storage, bypassing the blob storage dependency for secrets.
## Error Without This Setting
```
System.InvalidOperationException: Secret initialization from Blob storage failed
due to missing both an Azure Storage connection string and a SAS connection URI.
For Blob Storage, please provide at least one of these.
```
## When This Check Does NOT Apply
| Scenario | Why |
|----------|-----|
| Aspire project without Azure Functions | No Functions secret manager involved |
| Standalone Azure Functions (not Aspire) | Uses connection string by default |
| Functions with explicit connection string | `AzureWebJobsStorage` is a full connection string, not identity-based |
| `AzureWebJobsSecretStorageType` already set | Configuration is already present |
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| finishing-a-development-branchobra/superpowersUse when implementation is complete, all tests pass, and you need to decide how to integrate the work | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| systematic-debuggingobra/superpowersUse when encountering any bug, test failure, or unexpected behavior, before proposing fixes | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| test-driven-developmentobra/superpowersUse when implementing any feature or bugfix, before writing implementation code | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| skill-creatoranthropics/skillsCreate new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an existing skill, run evals to test a skill, benchmark skill performance with variance analysis, or optimize a skill's description for better triggering accuracy. | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |