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