1+ {
2+ "$schema" : " https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#" ,
3+ "contentVersion" : " 1.0.0.0" ,
4+ "parameters" : {
5+ "webAppName" : {
6+ "type" : " string" ,
7+ "defaultValue" : " [concat('webApp-', uniqueString(resourceGroup().id))]" ,
8+ "minLength" : 2 ,
9+ "metadata" : {
10+ "description" : " Web app name."
11+ }
12+ },
13+ "location" : {
14+ "type" : " string" ,
15+ "defaultValue" : " [resourceGroup().location]" ,
16+ "metadata" : {
17+ "description" : " Location for all resources."
18+ }
19+ },
20+ "sku" : {
21+ "type" : " string" ,
22+ "defaultValue" : " F1" ,
23+ "metadata" : {
24+ "description" : " The SKU of App Service Plan."
25+ }
26+ },
27+ "language" : {
28+ "type" : " string" ,
29+ "defaultValue" : " .net" ,
30+ "allowedValues" : [
31+ " .net" ,
32+ " php" ,
33+ " node" ,
34+ " html"
35+ ],
36+ "metadata" : {
37+ "description" : " The language stack of the app."
38+ }
39+ },
40+ "helloWorld" : {
41+ "type" : " bool" ,
42+ "defaultValue" : false ,
43+ "metadata" : {
44+ "description" : " true = deploy a sample Hello World app."
45+ }
46+ },
47+ "repoUrl" : {
48+ "type" : " string" ,
49+ "defaultValue" : " " ,
50+ "metadata" : {
51+ "description" : " Optional Git Repo URL"
52+ }
53+ }
54+ },
55+ "variables" : {
56+ "appServicePlanPortalName" : " [concat('AppServicePlan-', parameters('webAppName'))]" ,
57+ "gitRepoReference" : {
58+ ".net" : " https://github.com/Azure-Samples/app-service-web-dotnet-get-started" ,
59+ "node" : " https://github.com/Azure-Samples/nodejs-docs-hello-world" ,
60+ "php" : " https://github.com/Azure-Samples/php-docs-hello-world" ,
61+ "html" : " https://github.com/Azure-Samples/html-docs-hello-world"
62+ },
63+ "gitRepoUrl" : " [if(bool(parameters('helloWorld')), variables('gitRepoReference')[toLower(parameters('language'))], parameters('repoUrl'))]" ,
64+ "configReference" : {
65+ ".net" : {
66+ "comments" : " .Net app. No additional configuration needed."
67+ },
68+ "html" : {
69+ "comments" : " HTML app. No additional configuration needed."
70+ },
71+ "php" : {
72+ "phpVersion" : " 7.4"
73+ },
74+ "node" : {
75+ "appSettings" : [
76+ {
77+ "name" : " WEBSITE_NODE_DEFAULT_VERSION" ,
78+ "value" : " 12.15.0"
79+ }
80+ ]
81+ }
82+ }
83+ },
84+ "resources" : [
85+ {
86+ "type" : " Microsoft.Web/serverfarms" ,
87+ "apiVersion" : " 2020-06-01" ,
88+ "name" : " [variables('appServicePlanPortalName')]" ,
89+ "location" : " [parameters('location')]" ,
90+ "sku" : {
91+ "name" : " [parameters('sku')]"
92+ }
93+ },
94+ {
95+ "type" : " Microsoft.Web/sites" ,
96+ "apiVersion" : " 2020-06-01" ,
97+ "name" : " [parameters('webAppName')]" ,
98+ "location" : " [parameters('location')]" ,
99+ "dependsOn" : [
100+ " [resourceId('Microsoft.Web/serverfarms', variables('appServicePlanPortalName'))]"
101+ ],
102+ "properties" : {
103+ "siteConfig" : " [variables('configReference')[parameters('language')]]" ,
104+ "serverFarmId" : " [resourceId('Microsoft.Web/serverfarms', variables('appServicePlanPortalName'))]"
105+ },
106+ "resources" : [
107+ {
108+ "condition" : " [contains(variables('gitRepoUrl'),'http')]" ,
109+ "type" : " sourcecontrols" ,
110+ "apiVersion" : " 2020-06-01" ,
111+ "name" : " web" ,
112+ "location" : " [parameters('location')]" ,
113+ "dependsOn" : [
114+ " [resourceId('Microsoft.Web/sites', parameters('webAppName'))]"
115+ ],
116+ "properties" : {
117+ "repoUrl" : " [variables('gitRepoUrl')]" ,
118+ "branch" : " master" ,
119+ "isManualIntegration" : true
120+ }
121+ }
122+ ]
123+ }
124+ ]
125+ }
0 commit comments