Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- {
- "$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "parameters": {
- "siteName": {
- "type": "string",
- "metadata": {
- "description": "The name of the web app that you wish to create."
- }
- },
- "repoURL": {
- "type": "string",
- "metadata": {
- "description": "The URL for the GitHub repository that contains the project to deploy."
- }
- },
- "branch": {
- "type": "string",
- "defaultValue": "master",
- "metadata": {
- "description": "The branch of the GitHub repository to use."
- }
- },
- "planId": {
- "type": "string",
- "metadata": {
- "description": "App Service Plan Id"
- }
- },
- "zoneName": {
- "type": "string"
- }
- },
- "variables": {
- "appServicePlanName": "[concat(parameters('siteName'),'-asp-', uniquestring(resourceGroup().id))]"
- },
- "resources": [
- {
- "apiVersion": "2016-08-01",
- "name": "[parameters('siteName')]",
- "type": "Microsoft.Web/sites",
- "kind": "app,linux",
- "location": "[resourceGroup().location]",
- "properties": {
- "name": "[parameters('siteName')]",
- "serverFarmId": "[parameters('planId')]"
- },
- "resources": [
- {
- "apiVersion": "2015-08-01",
- "name": "web",
- "type": "sourcecontrols",
- "dependsOn": [
- "[resourceId('Microsoft.Web/Sites', parameters('siteName'))]"
- ],
- "properties": {
- "RepoUrl": "[parameters('repoURL')]",
- "branch": "[parameters('branch')]",
- "IsManualIntegration": true
- }
- }
- ]
- },
- {
- "type": "Microsoft.Network/dnsZones/CNAME",
- "name": "[concat(parameters('zoneName'), '/', parameters('siteName'))]",
- "apiVersion": "2016-04-01",
- "location": "global",
- "properties": {
- "TTL": 3600,
- "CNAMERecord": {
- "cname": "[concat(parameters('siteName'), '.azurewebsites.net')]"
- }
- },
- "dependsOn": [
- "[concat('Microsoft.Web/sites/',parameters('siteName'))]"
- ]
- },
- {
- "type": "Microsoft.Web/sites/hostnameBindings",
- "name": "[concat(parameters('siteName'), '/', parameters('siteName'), '.', parameters('zoneName'))]",
- "apiVersion":"2016-03-01",
- "location":"[resourceGroup().location]",
- "properties": {},
- "dependsOn": [
- "[concat('Microsoft.Web/sites/',parameters('siteName'))]",
- "[concat('Microsoft.Network/dnsZones/', parameters('zoneName'), '/CNAME/', parameters('siteName'))]"
- ]
- }
- ]
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement