[e77990]: / infrastructure / Scripts / Deploy-ARM.ps1

Download this file

22 lines (18 with data), 812 Bytes

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
#! /usr/bin/pwsh
Function DeployARM($resourceGroup, $location)
{
Pop-Location
$deployment = 'deployment.json'
Write-Host "--------------------------------------------------------" -ForegroundColor Yellow
Write-Host "Deploying infrastructure" -ForegroundColor Yellow
Write-Host "-------------------------------------------------------- " -ForegroundColor Yellow
$rg = $(az group show -n $resourceGroup -o json | ConvertFrom-Json)
if (-not $rg) {
Write-Host "$resourceGroup does not exist"
} else {
Write-Host "Begining the ARM deployment resources " -ForegroundColor Yellow
az group deployment create -g $resourceGroup --template-file $deployment --parameters location=$location
Write-Host "ARM uploaded..."
}
Push-Location Scripts
}