🎁 Get the FREE AI Skills Starter Guide β€” Subscribe β†’
BytesAgainBytesAgain
πŸ¦€ ClawHub

Azure Bicep Deploy

by @junior-juarez-msft

Deploy and validate Azure Bicep and ARM templates to manage resources and multi-environment setups, including Azure Container Apps configurations.

Versionv2.1.0
Downloads1,198
TERMINAL
clawhub install azure-bicep-deploy

πŸ“– About This Skill


name: azure-bicep-deploy description: Deploy and validate Azure Bicep files and ARM templates. Use for: (1) Deploying Bicep (.bicep) or ARM (JSON) templates to Azure, (2) Validating Bicep/ARM templates for syntax errors, (3) Creating Azure resources via Bicep, (4) Managing multi-environment deployments (dev/staging/prod) via parameters. Supports Azure Container Apps commonly used workloads. Prerequisites: Azure CLI (az) installed, Azure CLI authenticated (az login), Bicep CLI installed (az bicep install), appropriate Azure subscription access.

Azure Bicep Deploy

Prerequisites (Required)

Before using this skill, ensure:

1. Azure CLI installed

   az --version
   
Install from: https://docs.microsoft.com/cli/azure/install-azure-cli

2. Azure CLI authenticated

   az login          # Interactive login
   az login --tenant   # For specific tenant
   az account show   # Verify logged in
   

3. Correct subscription selected (if multiple)

   az account list                           # List subscriptions
   az account set --subscription    # Switch subscription
   

4. Bicep CLI installed

   az bicep install      # Install Bicep
   az bicep version      # Verify installation
   
Or use built-in: az deployment group create auto-compiles Bicep

Deploy a Bicep File

az deployment group create \
  --resource-group  \
  --template-file  \
  --parameters .json

Deploy an ARM Template

az deployment group create \
  --resource-group  \
  --template-file  \
  --parameters .json

Validate a Template (What-If)

az deployment group what-if \
  --resource-group  \
  --template-file 

Validate Syntax Only (Bicep)

az bicep build --file 

Multi-Environment Deployments

Use parameter files for each environment:

params/
β”œβ”€β”€ dev.bicepparam      # or dev.json
β”œβ”€β”€ staging.bicepparam  # or staging.json
└── prod.bicepparam     # or prod.json

Deploy with environment:

az deployment group create \
  --resource-group -dev \
  --template-file main.bicep \
  --parameters @params/dev.json

Azure Container Apps

See references/container-apps.md for detailed Container App patterns including:

  • Basic container deployment
  • Ingress configuration
  • Scaling rules
  • revisions/versions
  • Create New Resources

    When asked to create Azure resources via Bicep:

    1. Check if existing templates in references/ match your need 2. For Container Apps: use the sample in assets/container-app/ 3. For other resources: generate using az bicep build-params --file or reference Azure QuickStart Templates

    Scripts

    Copy scripts from references or use directly:

  • references/deploy.md β€” Deployment script with environment selection
  • references/validate.md β€” Validate and what-if
  • references/bicep-build.md β€” Build Bicep to ARM
  • Quick deploy (copy-paste one-liner):

    az deployment group create --resource-group  --template-file main.bicep --parameters @params/dev.json