Advertisement
Guest User

Untitled

a guest
Jul 21st, 2017
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
JSON 2.70 KB | None | 0 0
  1. {
  2.   "$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
  3.   "contentVersion": "1.0.0.0",
  4.   "parameters": {
  5.     "siteName": {
  6.       "type": "string",
  7.       "metadata": {
  8.         "description": "The name of the web app that you wish to create."
  9.       }
  10.     },
  11.     "repoURL": {
  12.       "type": "string",
  13.       "metadata": {
  14.         "description": "The URL for the GitHub repository that contains the project to deploy."
  15.       }
  16.     },
  17.     "branch": {
  18.       "type": "string",
  19.       "defaultValue": "master",
  20.       "metadata": {
  21.         "description": "The branch of the GitHub repository to use."
  22.       }
  23.     },
  24.     "planId": {
  25.       "type": "string",
  26.       "metadata": {
  27.         "description": "App Service Plan Id"
  28.       }
  29.     },
  30.     "zoneName": {
  31.       "type": "string"
  32.     }
  33.   },
  34.   "variables": {
  35.     "appServicePlanName": "[concat(parameters('siteName'),'-asp-', uniquestring(resourceGroup().id))]"
  36.   },
  37.   "resources": [
  38.     {
  39.       "apiVersion": "2016-08-01",
  40.       "name": "[parameters('siteName')]",
  41.       "type": "Microsoft.Web/sites",
  42.       "kind": "app,linux",
  43.       "location": "[resourceGroup().location]",
  44.       "properties": {
  45.         "name": "[parameters('siteName')]",
  46.         "serverFarmId": "[parameters('planId')]"
  47.       },
  48.       "resources": [
  49.         {
  50.           "apiVersion": "2015-08-01",
  51.           "name": "web",
  52.           "type": "sourcecontrols",
  53.           "dependsOn": [
  54.             "[resourceId('Microsoft.Web/Sites', parameters('siteName'))]"
  55.           ],
  56.           "properties": {
  57.             "RepoUrl": "[parameters('repoURL')]",
  58.             "branch": "[parameters('branch')]",
  59.             "IsManualIntegration": true
  60.           }
  61.         }
  62.       ]
  63.     },
  64.     {
  65.       "type": "Microsoft.Network/dnsZones/CNAME",
  66.       "name": "[concat(parameters('zoneName'), '/', parameters('siteName'))]",
  67.       "apiVersion": "2016-04-01",
  68.       "location": "global",
  69.       "properties": {
  70.         "TTL": 3600,
  71.         "CNAMERecord": {
  72.           "cname": "[concat(parameters('siteName'), '.azurewebsites.net')]"
  73.         }
  74.       },
  75.       "dependsOn": [
  76.           "[concat('Microsoft.Web/sites/',parameters('siteName'))]"
  77.       ]
  78.     },
  79.     {
  80.       "type": "Microsoft.Web/sites/hostnameBindings",
  81.       "name": "[concat(parameters('siteName'), '/', parameters('siteName'), '.', parameters('zoneName'))]",
  82.       "apiVersion":"2016-03-01",
  83.       "location":"[resourceGroup().location]",
  84.       "properties": {},
  85.       "dependsOn": [
  86.           "[concat('Microsoft.Web/sites/',parameters('siteName'))]",
  87.           "[concat('Microsoft.Network/dnsZones/', parameters('zoneName'), '/CNAME/', parameters('siteName'))]"
  88.       ]
  89.     }
  90.   ]
  91. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement