-
Notifications
You must be signed in to change notification settings - Fork 0
/
azuredeploy.ps1
26 lines (26 loc) · 1.09 KB
/
azuredeploy.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
# template file and params copied to local
$localpath = "<your local path>"
$templatefile = $localpath + "azuredeploy.json"
$templateparamfile = $localpath + "azuredeploy.parameters.json"
# Change this location to your preferred location:
$location = "Central US"
#get prefix from parameter file
$params = get-content $templateparamfile | ConvertFrom-Json
$prefix = $params.parameters.deploymentPrefix.value
# using template naming conventions for rg, sqlserver and keyvault
$rgname = $prefix + "-rg"
$rg = get-azresourcegroup -location $location -name $rgname
if ($null -eq $rg)
{
new-azresourcegroup -location $location -name $rgname
}
# Deploying ARM template
New-AzResourceGroupDeployment -ResourceGroupName $rgname -TemplateFile $templateFile -TemplateParameterFile $templateparamfile
write-host "ARM Deployment Complete"
# the outcome of deployment:
# + App Insights instance
# + Azure Batch Account
# + Virtual Network for the Worker Pool
# + Storage Account for the batch artifacts (applications, files)
# + Premium Storage Account with Azure File Share
get-azresource -resourcegroup $rgname