Azure JSON and ARM
(How to configure resources in Azure using a declarative syntax with JSON and ARM) *powershell *learn powershell *automation *learn automation *infrastucture as code *IaC *Azure Resource manager and powershell *ARM and Json *json files and Azure resource Manager *automatic deployment *automatic installations *configuration as code Code : #connect to azure. param( [Parameter(Mandatory=$false)][String] $rgGroupname = "demo_rg" ) Connect-AzAccount $context = (Get-AzSubscription).id Set-AzContext $context try { $rg = Get-AzResourceGroup -ResourceGroupName $rgGroupname -ErrorAction Stop } catch { Write-Error "Could not find the resource group with name $rgGroupname, make sure it exists and try again" exit -1 } Set-AzDefault -ResourceGroupName $rgGroupname $CWD = Split-Path $MyInvocation.MyCommand.Definition $templateFile = "$CWD\part1.json" $today = Get-Date -Format "MM-dd-yyyy-hh-mm-ss" $deploymentName = "simpletemplate$today" New-AzResourceGroupDeployment -Name $deploymentName -TemplateFile $templateFile
Download
0 formatsNo download links available.