(How to create Azure resources using bicep files)
In this video I demonstrate how you can create resources using bicep files instead of json files. I also demonstrate how you can convert a JSON file to a bicep file.
Using bicep files is really great for managing azure resources.
*using bicep files in azure
*create a storage account with bicep and powershell
*decompile JSON to bicep
*param in bicep file
*Automation azure
*azure automation
*azure bicep
*azure json
*transpile json to bicep
*powershell
*learn powershell
*automation
*learn automation
*windows
*windows powershell
*automatic deployment
*automatic installations
*configuration as code
Code df :
var location = resourceGroup().location
param tag2 string = 'value2-default'
resource mydf 'Microsoft.DataFactory/factories@2018-06-01' = {
name: 'myaf'
location: location
tags: {
tag1: 'value1'
tag2: tag2
}
}
Code storage accounts:
param tag2 string = 'value2-default'
param stname string = 'mrb2411'
var sku = 'Standard_LRS'
var kind = 'StorageV2'
resource mystorageacc 'Microsoft.Storage/storageAccounts@2021-04-01' = {
name: stname
location: resourceGroup().location
tags:{
tag1: 'value1'
tag2: tag2
}
sku: {
name: sku
}
kind: kind
}
Powershell wrapper for account creation:
for ($i =0; $i -lt 10; $i++){
New-AzResourceGroupDeployment -TemplateFile part.bicep `
-stname "mrb2412$i" -tag2 "overwrited value $i"
}
Export resourcegroup to JSON
Export-AzResourceGroup -ResourceGroupName "name_rg"
deploy a bicep : New-AzResourceGroupDeployment -TemplateFile .\df.bicep
decompile: bicep decompile filepath.json
Watch video Azure and Bicep online, duration hours minute second in high quality that is uploaded to the channel Mr Automation 18 September 2021. Share the link to the video on social media so that your subscribers and friends will also watch this video. This video clip has been viewed 786 times and liked it 11 visitors.