agentleFS
ENFEX-makerENFEX-maker/azure-worker-skillset/skills/devops/azure-iac-bicep-terraform/SKILL.md

azure-iac-bicep-terraform

Skill0 starsChanged 5 months agoMITView on GitHub

Use when authoring, reviewing, validating, planning, or troubleshooting Azure Infrastructure as Code with ARM templates, Bicep, Terraform, or deployment pipelines.

The file

We split this skill into the rules it gives an agent

5 rules. About 0 are common, 4 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈4

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Never apply infrastructure changes before showing a plan/what-if and getting explicit approval.

    line 32
  2. Very specific:

    Use sub, mg, or tenant deployment scopes when appropriate.

    line 46
  3. Distinctive:

    Check parameters/variables for secrets.

    line 64
  4. Distinctive:

    Ask for explicit approval before apply/create.

    line 68
  5. Distinctive:

    Verify deployed resources and outputs.

    line 69

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

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Azure IaC: Bicep, ARM, and Terraform

Overview

Covers safe Azure Infrastructure as Code workflows for Bicep/ARM and Terraform.

When to Use

Use for:

  • writing or reviewing Bicep/ARM/Terraform
  • debugging deployment failures
  • converting portal steps to IaC
  • validating templates and modules
  • planning and applying infrastructure changes
  • CI/CD deployment design

Safety Rules

Never apply infrastructure changes before showing a plan/what-if and getting explicit approval.

Protect state files and secret variables. Do not print .tfstate, connection strings, access keys, or Key Vault secret values.

Bicep Commands

az bicep version
az bicep build --file main.bicep
az deployment group validate --resource-group <rg> --template-file main.bicep --parameters @params.json
az deployment group what-if --resource-group <rg> --template-file main.bicep --parameters @params.json
az deployment group create --resource-group <rg> --template-file main.bicep --parameters @params.json

Use sub, mg, or tenant deployment scopes when appropriate.

Terraform Commands

terraform fmt -recursive
terraform init
terraform validate
terraform plan -out tfplan
terraform show -no-color tfplan
terraform apply tfplan

For Azure, confirm backend and provider authentication before planning.

Review Pattern

  1. Identify deployment scope and target subscription/tenant.
  2. Check parameters/variables for secrets.
  3. Validate syntax.
  4. Run plan/what-if.
  5. Review destructive changes, public exposure, RBAC, networking, and SKU/cost.
  6. Ask for explicit approval before apply/create.
  7. Verify deployed resources and outputs.

Professional Runbooks

Load references/runbooks.md for production-oriented scenario runbooks. Each runbook includes preflight commands, diagnosis path, safe action gate, verification, and documentation lookup query. For risky operations, use the master azure-worker safety baseline before executing changes.

Common Pitfalls

  • Running group-scope deployment for subscription-scope resources.
  • Bicep modules with wrong relative paths.
  • Terraform provider using the wrong subscription due to environment variables.
  • Accidentally committing state or plan files with secrets.
  • Ignoring delete actions in plan output.
  • Assuming what-if catches every runtime policy/permission issue.

Verification Checklist

  • Scope and subscription confirmed.
  • Format/build/validate completed.
  • Plan/what-if reviewed.
  • Destructive/security-sensitive changes highlighted.
  • Apply/create approved explicitly.
  • Post-deploy read-only verification completed.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.