0
0
Azurecloud~10 mins

Bicep as ARM simplification in Azure - Step-by-Step Execution

Choose your learning style9 modes available
Process Flow - Bicep as ARM simplification
Write Bicep code
Bicep CLI compiles to ARM JSON
ARM Template JSON deployed to Azure
Azure resources created/updated
Deployment result returned
Bicep code is written simply, then compiled into ARM JSON templates, which Azure deploys to create or update resources.
Execution Sample
Azure
param location string = 'eastus'
resource storage 'Microsoft.Storage/storageAccounts@2022-09-01' = {
  name: 'mystorageaccount'
  location: location
  kind: 'StorageV2'
  sku: {
    name: 'Standard_LRS'
  }
}
This Bicep code defines a storage account resource with parameters and properties, which compiles to ARM JSON for deployment.
Process Table
StepActionInputOutputNotes
1Write Bicep codeBicep syntax with param and resourceBicep file (.bicep)User defines parameters and resources simply
2Compile BicepBicep fileARM JSON templateBicep CLI converts to ARM JSON format
3Deploy ARM templateARM JSON templateAzure deployment operationAzure Resource Manager processes template
4Create/Update resourcesDeployment operationAzure resources provisionedResources like storage account created
5Return deployment resultDeployment statusSuccess or failure messageUser sees deployment outcome
💡 Deployment completes when Azure finishes creating or updating resources.
Status Tracker
VariableStartAfter CompileAfter DeployFinal
location'eastus''eastus''eastus''eastus'
storage resourceundefinedARM JSON resource objectProvisioning startedProvisioned in Azure
Key Moments - 3 Insights
Why do we write Bicep code instead of ARM JSON directly?
Bicep code is simpler and easier to read than ARM JSON. The execution_table row 2 shows Bicep compiling to ARM JSON automatically, so you don't write complex JSON by hand.
What happens after compiling Bicep to ARM JSON?
After compiling (row 2), the ARM JSON is deployed to Azure (row 3), which then creates or updates resources (row 4). The compile step does not deploy, it only prepares the template.
Can I change parameters after deployment?
Parameters like 'location' are set before deployment (row 1). To change them, you update the Bicep code or parameters and redeploy, triggering a new deployment cycle.
Visual Quiz - 3 Questions
Test your understanding
Look at the execution_table, what is the output of step 2?
ABicep code file
BARM JSON template
CAzure deployment operation
DProvisioned Azure resources
💡 Hint
Check the 'Output' column for step 2 in the execution_table.
At which step does Azure start creating resources?
AStep 4
BStep 2
CStep 3
DStep 1
💡 Hint
Look at the 'Action' and 'Notes' columns in the execution_table for when resources are provisioned.
If you change the 'location' parameter in Bicep, which variable_tracker column shows the updated value after deployment?
AStart
BAfter Compile
CFinal
DAfter Deploy
💡 Hint
Check the 'location' row in variable_tracker to see where the final deployed value appears.
Concept Snapshot
Bicep simplifies ARM templates by using concise syntax.
Write Bicep code with parameters and resources.
Compile Bicep to ARM JSON using CLI.
Deploy ARM JSON to Azure to create resources.
Bicep improves readability and maintainability.
Full Transcript
Bicep is a simpler way to write Azure infrastructure code compared to ARM JSON. You write Bicep code with parameters and resource definitions. Then, you use the Bicep CLI to compile this code into an ARM JSON template. This ARM template is what Azure understands for deployment. When you deploy the ARM template, Azure Resource Manager creates or updates the resources defined, such as storage accounts. The process ends when deployment completes successfully or with an error. Variables like parameters keep their values through compile and deploy steps. Bicep helps avoid writing complex JSON by hand and makes infrastructure as code easier to manage.