-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdeployaz.ps1
34 lines (22 loc) · 1003 Bytes
/
deployaz.ps1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
<#
.DESCRIPTION
Powershell Script to Deploy App Service Plan automating the name from resource tags.
Created by Elliott Olver www.etsolutionsau.com
#>
param (
[string] $resourceGroupName,
[string] $resourceGroupLocation,
[string] $location,
[string] $purpose,
[string] $sku,
[string] $skucode
)
$templateFilePath="$PSScriptRoot\template.json"
$parametersFilePath="$PSScriptRoot\parameters.json"
."$PSScriptRoot\masterdeployaz.ps1" -resourceGroupName $resourceGroupName
$aspname=$pn+$cus+"-"+$env+"-"+$purpose+"-"+"asp"+"-"+$loc
Write-Output ("$aspName")
Write-Output ("##vso[task.setvariable variable=aspname;]$aspName")
$deploymentName="asp"+"-"+$aspname
New-AzResourceGroupDeployment -ResourceGroupName $resourceGroupName -name $deploymentName -TemplateFile $templateFilePath `
-TemplateParameterFile $parametersFilePath -aspname $aspName -Location $location -sku $sku -skuCode $skucode