Azure and Bicep

Опубликовано: 18 Сентябрь 2021
на канале: Mr Automation
786
11

(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


Смотрите видео Azure and Bicep онлайн, длительностью часов минут секунд в хорошем качестве, которое загружено на канал Mr Automation 18 Сентябрь 2021. Делитесь ссылкой на видео в социальных сетях, чтобы ваши подписчики и друзья так же посмотрели это видео. Данный видеоклип посмотрели 786 раз и оно понравилось 11 посетителям.