Skip to content

Instantly share code, notes, and snippets.

@jessebarocio
Created March 6, 2018 22:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jessebarocio/49fef17af94a5211bafb12b157e4d06d to your computer and use it in GitHub Desktop.
Save jessebarocio/49fef17af94a5211bafb12b157e4d06d to your computer and use it in GitHub Desktop.
build-arm-templates
az group create -n my-deployment-test -l westus2
az group deployment create -g my-deployment-test \
--template-uri https://raw.githubusercontent.com/jessebarocio/soa-arm-templates/master/basic-webapp/template.json
{
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"SiteName": {
"type": "string"
},
"AppServicePlanSku": {
"type": "string",
"allowedValues": [
"F1",
"S1",
"P1"
]
}
},
"variables": {
"appServicePlanName": "[concat(parameters('SiteName'), '-AppServicePlan')]",
"siteName": "[parameters('SiteName')]"
},
"resources": [
{
"type": "Microsoft.Web/serverfarms",
"sku": {
"name": "[parameters('AppServicePlanSku')]"
},
"kind": "app",
"name": "[variables('appServicePlanName')]",
"apiVersion": "2016-09-01",
"location": "[resourceGroup().location]",
"scale": null,
"properties": { },
"dependsOn": []
},
{
"type": "Microsoft.Web/sites",
"kind": "app",
"name": "[variables('siteName')]",
"apiVersion": "2016-08-01",
"location": "[resourceGroup().location]",
"scale": null,
"properties": {
"serverFarmId": "[resourceId('Microsoft.Web/serverfarms', variables('appServicePlanName'))]"
},
"dependsOn": [
"[resourceId('Microsoft.Web/serverfarms', variables('appServicePlanName'))]"
]
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment