iac-common
Skill3 starsChanged 8 months agoMITArchived repositoryView on GitHub
Shared IaC deploy patterns for Bicep and Terraform deploy agents: deployment strategies, circuit breaker, known deploy issues. For preflight validation (auth, governance, stop rules), see azure-validate. USE FOR: Phased deployment, circuit breaker, deploy-specific known issues. DO NOT USE FOR: Preflight validation (use azure-validate), code generation (use azure-bicep-patterns or terraform-patterns).
In this repository48 other files it gives its agents.
- AGENTS.mdAGENTS.md
- .github/copilot-instructions.mdCopilot instructions
- appinsights-instrumentationSkill
- azure-adrSkill
- azure-aigatewaySkill
- azure-aiSkill
- azure-artifactsSkill
- azure-bicep-patternsSkill
- azure-cloud-migrateSkill
- azure-complianceSkill
- azure-computeSkill
- azure-cost-optimizationSkill
- azure-defaultsSkill
- azure-deploySkill
- azure-diagnosticsSkill
- azure-diagramsSkill
- azure-hosted-copilot-sdkSkill
- azure-kustoSkill
- azure-messagingSkill
- azure-prepareSkill
- azure-quotasSkill
- azure-rbacSkill
- azure-resource-lookupSkill
- azure-resource-visualizerSkill
- azure-storageSkill
- azure-validateSkill
- context-optimizerSkill
- context-shreddingSkill
- copilot-customizationSkill
- count-registrySkill
- docs-writerSkill
- drawioSkill
- entra-app-registrationSkill
- excalidrawSkill
- github-operationsSkill
- golden-principlesSkill
- make-skill-templateSkill
- mermaidSkill
- microsoft-code-referenceSkill
- microsoft-docsSkill
- microsoft-foundrySkill
- microsoft-skill-creatorSkill
- python-diagramsSkill
- session-resumeSkill
- terraform-patternsSkill
- terraform-search-importSkill
- terraform-testSkill
- workflow-engineSkill
The file
We split this skill into the rules it gives an agent
4 rules. About 0 are common, 1 is distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 20
Use azd when the project has an azure.yaml manifest.
- Very specific: line 56
Before azd provision --no-prompt, verify these environment values are set:
- Very specific: line 63
Run azd env get-values and check for missing values.
- Distinctive: line 122
Escalation protocol: write to session state, notify user, wait for guidance
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
IaC Common Skill
Shared deployment patterns used by both Bicep and Terraform deploy agents (07b, 07t) and review subagents.
Preflight validation (CLI auth, governance mapping, stop rules, known issues) has moved to the azure-validate skill. See
azure-validate/references/infraops-preflight.md.
Deployment Strategies
azd Deployment (recommended for projects with azure.yaml)
Use azd when the project has an azure.yaml manifest. Each project is a self-contained
azd project with azure.yaml and .azure/ inside infra/{iac}/{project}/.
# Navigate to the project directory (azure.yaml must be here)
cd infra/{iac}/{project}
# Or use -C flag from repo root
azd -C infra/{iac}/{project} env list
# Create/select environment (use {project}-{env} naming to avoid collisions)
azd env new {project}-{env}
azd env set AZURE_LOCATION swedencentral
# Preview changes (replaces what-if)
azd provision --preview
# Deploy infrastructure
azd provision
# Full provision + deploy in one step
azd upazd hooks replace custom deploy.ps1 pre/post steps:
preprovision— auth validation, banner, prerequisite checkspostprovision— resource verification, diagnostic setup
Environment management replaces manual parameterization:
azd env new prod/azd env new devazd env set AZURE_LOCATION swedencentral
azd Environment Preflight (MANDATORY for --no-prompt Deploys)
Before azd provision --no-prompt, verify these environment values are set:
AZURE_SUBSCRIPTION_ID— fromaz account show --query id -o tsvAZURE_RESOURCE_GROUP— target resource group nameAZURE_ENV_NAME— environment nameAZURE_LOCATION— target region
Run azd env get-values and check for missing values. If any are empty,
set them via azd env set {KEY} {VALUE} before attempting --no-prompt.
Phased Deployment via deploy.ps1 (legacy, backward-compatible)
| Phase | Resources | Gate |
| Foundation | Resource group, networking, Key Vault | User approval |
| Security | Identity, RBAC, certificates | User approval |
| Data | Storage, databases, messaging | User approval |
| Compute | App Service, Functions, containers | User approval |
| Edge | CDN, Front Door, DNS | User approval |
- Bicep: Pass
-Phase {name}todeploy.ps1 - Terraform: Pass
-var deployment_phase={name}to plan/apply
Single Deployment (only for <5 resources, dev/test)
Deploy everything in one operation. Still requires user approval.
Decision: azd vs deploy.ps1
Full guide: azd-vs-deploy-guide.md — comparison, per-project conventions, workflow, hooks, troubleshooting.
| Factor | azd | deploy.ps1 |
| Cross-platform | Yes | PowerShell only |
| Environment management | Built-in (azd env) | Manual parameters |
| Hooks (pre/post) | azure.yaml hooks | Custom script logic |
| Phased deployment | Single provision | Fine-grained phases |
| New projects | Use azd | Not generated |
| Existing projects | Use azd if azure.yaml exists | Fallback if no azure.yaml |
| Project isolation | Per-project: infra/{iac}/{project}/azure.yaml + .azure/ | Per-project: infra/{iac}/{project}/deploy.ps1 |
| Env naming | {project}-{env} (e.g., hub-spoke-dev) | Manual parameter per invocation |
Reference Index
| Reference | Location |
| azd vs deploy.ps1 guide | references/azd-vs-deploy-guide.md |
| Preflight validation | azure-validate/references/infraops-preflight.md |
| CLI auth validation procedure | azure-defaults/references/azure-cli-auth-validation.md |
| Policy effect decision tree | azure-defaults/references/policy-effect-decision-tree.md |
| IaC policy compliance | .github/instructions/iac-bicep-best-practices.instructions.md / .github/instructions/iac-terraform-best-practices.instructions.md |
| Bootstrap backend templates | terraform-patterns/references/bootstrap-backend-template.md |
| Deploy script templates | terraform-patterns/references/deploy-script-template.md |
| Circuit breaker | references/circuit-breaker.md |
Circuit Breaker
Deploy agents MUST read references/circuit-breaker.md before starting
any deployment. It defines:
- Failure taxonomy: 6 categories (build, validation, deployment, empty, timeout, auth)
- Anomaly patterns: detection thresholds for repetitive failures
- Stopping rule: 3 consecutive same-type failures → halt + escalate
- Escalation protocol: write to session state, notify user, wait for guidance
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

