Skip to content

e2eSolutionArchitect/azure-bicep

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

78 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Azure Bicep

Bicep is a Domain Specific Language (DSL) for deploying Azure resources declaratively.

"Why not focus your energy on Terraform or other third-party IaC offerings?" ' Using Terraform can be a great choice depending on the requirements of the organization, and if you are happy using Terraform there is no reason to switch. At Microsoft, we are actively investing to make sure the Terraform on Azure experience is the best it can be.' - Please check the reference here

HELPLINE(https://e2esolutionarchitect.com/helpline/)

Install Bicep

Assuming Azure CLI is already installed

az bicep install
az bicep version

Install Bicep extension in VSCode click here

Build .bicep file

# It will generate .json file. Which can be deployed as ARM template. 
az bicep build --file main.bicep

Debug

az deployment group create --resource-group <resource-group-name> --template-file ./modules/compute/vmLinux.bicep --parameters ./params/dev/vmLinux.bicepparam --verbose --debug

Deploy

# Deploy ARM template
az deployment group create -f main.json -g <resource-group-name> -c

# Deploy Bicep
az deployment group create -f main.bicep -g <resource-group-name> -c
# Using parameter file
az deployment group create -g rg-dev -f main.bicep --parameters ./parameters/main.dev.bicepparam -c

# Deploy using subscription
az deployment sub create -l eastus -f main.bicep
# Using parameter file
az deployment sub create -l eastus -f rg.bicep --parameters ./parameters/rg.dev.bicepparam -c

IMPORTANT: Avoid unnecessary cost by terminating the resources after experiment

Run below command to remove the resource group. Deleting the resource group will delete all the resources under the resource group. You do not need to terminate resources individually

# Azure CLI
az group delete --name ExampleResourceGroup

# PowerShell
Remove-AzResourceGroup -Name ExampleResourceGroup

e2esa-bootcamp-posters-01 Please visit https://e2esolutionarchitect.com. Feel free to write us for any queries to som@e2eSolutionArchitect.com

About

Azure bicep

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published