Guest User

Untitled

a guest
Aug 16th, 2018
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.22 KB | None | 0 0
  1. "resources": [
  2. {
  3. "apiVersion": "2015-08-01",
  4. "name": "appsettings",
  5. "type": "config",
  6. "dependsOn": [
  7. "[resourceId('Microsoft.Web/Sites/Slots', variables('webSiteName'), 'Staging')]"
  8. ],
  9. "properties": {
  10. "AppSettingKey1": "Some staging value",
  11. "AppSettingKey2": "My second staging setting",
  12. "AppSettingKey3": "My third staging setting"
  13. }
  14. }
  15. ]
  16.  
  17. {
  18. "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
  19. "contentVersion": "1.0.0.0",
  20. "parameters": {
  21. "hostingPlanName": {
  22. "type": "string",
  23. "minLength": 1
  24. },
  25. "skuName": {
  26. "type": "string",
  27. "defaultValue": "S1",
  28. "allowedValues": [
  29. "F1",
  30. "D1",
  31. "B1",
  32. "B2",
  33. "B3",
  34. "S1",
  35. "S2",
  36. "S3",
  37. "P1",
  38. "P2",
  39. "P3",
  40. "P4"
  41. ],
  42. "metadata": {
  43. "description": "Describes plan's pricing tier and instance size. Check details at https://azure.microsoft.com/en-us/pricing/details/app-service/"
  44. }
  45. },
  46. "skuCapacity": {
  47. "type": "int",
  48. "defaultValue": 1,
  49. "minValue": 1,
  50. "metadata": {
  51. "description": "Describes plan's instance count"
  52. }
  53. }
  54. },
  55. "variables": {
  56. "webSiteName": "[concat('webSite', uniqueString(resourceGroup().id))]"
  57. },
  58. "resources": [
  59. {
  60. "apiVersion": "2015-08-01",
  61. "name": "[parameters('hostingPlanName')]",
  62. "type": "Microsoft.Web/serverfarms",
  63. "location": "[resourceGroup().location]",
  64. "tags": {
  65. "displayName": "HostingPlan"
  66. },
  67. "sku": {
  68. "name": "[parameters('skuName')]",
  69. "capacity": "[parameters('skuCapacity')]"
  70. },
  71. "properties": {
  72. "name": "[parameters('hostingPlanName')]"
  73. }
  74. },
  75. {
  76. "apiVersion": "2015-08-01",
  77. "dependsOn": [
  78. "[concat('Microsoft.Web/serverfarms/', parameters('hostingPlanName'))]"
  79. ],
  80. "location": "[resourceGroup().location]",
  81. "name": "[variables('webSiteName')]",
  82. "properties": {
  83. "name": "[variables('webSiteName')]",
  84. "serverFarmId": "[resourceId('Microsoft.Web/serverfarms', parameters('hostingPlanName'))]"
  85. },
  86. "resources": [
  87. {
  88. "apiVersion": "2015-08-01",
  89. "name": "Staging",
  90. "type": "slots",
  91. "location": "[resourceGroup().location]",
  92. "dependsOn": [
  93. "[resourceId('Microsoft.Web/Sites', variables('webSiteName'))]"
  94. ],
  95. "properties": {
  96. },
  97. "resources": [
  98. {
  99. "apiVersion": "2015-08-01",
  100. "name": "appsettings",
  101. "type": "config",
  102. "dependsOn": [
  103. "[resourceId('Microsoft.Web/Sites/Slots', variables('webSiteName'), 'Staging')]"
  104. ],
  105. "properties": {
  106. "AppSettingKey1": "Some staging value",
  107. "AppSettingKey2": "My second staging setting",
  108. "AppSettingKey3": "My third staging setting"
  109. }
  110. }
  111. ]
  112. }
  113.  
  114. ],
  115. "tags": {
  116. "[concat('hidden-related:', resourceGroup().id, '/providers/Microsoft.Web/serverfarms/', parameters('hostingPlanName'))]": "Resource",
  117. "displayName": "Website"
  118. },
  119. "type": "Microsoft.Web/sites"
  120. }
  121. ]
  122. }
  123.  
  124. "resources": [
  125. {
  126. "apiVersion": "2015-08-01",
  127. "name": "appsettings",
  128. "type": "config",
  129. "dependsOn": [
  130. "[resourceId('Microsoft.Web/Sites/Slots', variables('webSiteName'), 'Staging')]"
  131. ],
  132. "properties": {
  133. "AppSettingKey1": "Some staging value",
  134. "AppSettingKey2": "My second staging setting",
  135. "AppSettingKey3": "My third staging setting"
  136. },
  137. {
  138. "apiVersion": "2015-08-01",
  139. "name": "slotconfignames",
  140. "type": "config",
  141. "dependsOn": [
  142. "[resourceId('Microsoft.Web/Sites', variables('webSiteName'))]"
  143. ],
  144. "properties": {
  145. "appSettingNames": [ "AppSettingKey1", "AppSettingKey2" ]
  146. }
  147. }
  148. ]
  149.  
  150. "resources": [
  151. {
  152. "apiVersion":"[variables('siteApiVersion')]",
  153. "name":"[variables('WebAppName')]",
  154. "type":"Microsoft.Web/sites",
  155. "kind":"api",
  156. "location":"[variables('location')]",
  157. "tags":{
  158. "[concat('hidden-related:', resourceId('Microsoft.Web/serverfarms', variables('hostingPlanName')))]":"empty"
  159. },
  160. "properties":{
  161. "name":"[variables('WebAppName')]",
  162. "serverFarmId":"[resourceId('Microsoft.Web/serverfarms', variables('hostingPlanName'))]",
  163. "siteConfig":{
  164. "AlwaysOn":"[parameters('AppServiceAlwaysOn')]"
  165. }
  166. },
  167. "resources":[
  168. {
  169. "apiVersion":"[variables('apiVersion')]",
  170. "type":"config",
  171. "name":"appsettings",
  172. "dependsOn":[
  173. "[variables('WebAppName')]"
  174. ],
  175. "properties":{}
  176. },
  177. {
  178. "apiVersion":"[variables('siteApiVersion')]",
  179. "type": "config",
  180. "name": "slotconfignames",
  181. "dependsOn": [
  182. "[concat('Microsoft.Web/sites/', variables('WebAppName'))]"
  183. ],
  184. "properties": {
  185. "appSettingNames": [ "WEBJOBS_DISABLE_SCHEDULE" ]
  186. }
  187. },
  188. {
  189. "apiVersion":"[variables('siteApiVersion')]",
  190. "condition":"[parameters('stagingSlotEnabled')]",
  191. "name":"[parameters('stagingSlotName')]",
  192. "type":"slots",
  193. "tags":{
  194. "displayName":"[concat(variables('WebAppName'), ' ', parameters('stagingSlotName'))]"
  195. },
  196. "location":"[variables('location')]",
  197. "dependsOn":[
  198. "[resourceId('Microsoft.Web/Sites', variables('WebAppName'))]"
  199. ],
  200. "properties":{},
  201. "resources":[
  202. {
  203. "apiVersion":"[variables('apiVersion')]",
  204. "type":"config",
  205. "name":"appsettings",
  206. "dependsOn":[
  207. "[resourceId('Microsoft.Web/Sites/Slots', variables('WebAppName'), parameters('stagingSlotName'))]"
  208. ],
  209. "properties":{
  210. "WEBJOBS_DISABLE_SCHEDULE" : "1"
  211. }
  212. }
  213. ]
  214. }
  215. ]
  216. }
Add Comment
Please, Sign In to add comment