azuredeploy.json 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. {
  2. "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
  3. "contentVersion": "1.0.0.0",
  4. "parameters": {
  5. "siteName": {
  6. "type": "string"
  7. },
  8. "hostingPlanName": {
  9. "type": "string"
  10. },
  11. "siteLocation": {
  12. "type": "string",
  13. "default": "West US"
  14. },
  15. "sku": {
  16. "type": "string",
  17. "allowedValues": [
  18. "Free",
  19. "Shared",
  20. "Basic",
  21. "Standard"
  22. ],
  23. "defaultValue": "Free"
  24. },
  25. "workerSize": {
  26. "type": "string",
  27. "allowedValues": [
  28. "0",
  29. "1",
  30. "2"
  31. ],
  32. "defaultValue": "0"
  33. },
  34. "Slack: Slack team name": {
  35. "type": "string"
  36. },
  37. "Slack: Slack team url": {
  38. "type": "string"
  39. },
  40. "Slack: Slack token": {
  41. "type": "string"
  42. },
  43. "Slack: Required invite token": {
  44. "type": "string"
  45. }
  46. },
  47. "variables": {},
  48. "resources": [
  49. {
  50. "apiVersion": "2014-06-01",
  51. "name": "[parameters('hostingPlanName')]",
  52. "type": "Microsoft.Web/serverFarms",
  53. "location": "[parameters('siteLocation')]",
  54. "properties": {
  55. "name": "[parameters('hostingPlanName')]",
  56. "sku": "[parameters('sku')]",
  57. "workerSize": "[parameters('workerSize')]",
  58. "numberOfWorkers": 1
  59. }
  60. },
  61. {
  62. "type": "Microsoft.Web/sites",
  63. "name": "[parameters('siteName')]",
  64. "apiVersion": "2015-08-01",
  65. "location": "[parameters('siteLocation')]",
  66. "tags": {
  67. "[concat('hidden-related:', resourceGroup().id, '/providers/Microsoft.Web/serverfarms/', parameters('hostingPlanName'))]": "empty"
  68. },
  69. "dependsOn": [
  70. "[concat('Microsoft.Web/serverFarms/', parameters('hostingPlanName'))]"
  71. ],
  72. "properties": {
  73. "name": "[parameters('siteName')]",
  74. "serverFarm": "[parameters('hostingPlanName')]"
  75. },
  76. "resources": [{
  77. "apiVersion": "2014-04-01",
  78. "type": "config",
  79. "name": "web",
  80. "dependsOn": [
  81. "[concat('Microsoft.Web/Sites/', parameters('siteName'))]"
  82. ],
  83. "properties": {
  84. "appSettings": [{
  85. "name": "COMMUNITY_NAME",
  86. "value": "[parameters('Slack: Slack team name')]"
  87. }, {
  88. "name": "SLACK_URL",
  89. "value": "[parameters('Slack: Slack team url')]"
  90. }, {
  91. "name": "SLACK_TOKEN",
  92. "value": "[parameters('Slack: Slack token')]"
  93. }, {
  94. "name": "INVITE_TOKEN",
  95. "value": "[parameters('Slack: Required invite token')]"
  96. }]
  97. }
  98. }]
  99. }
  100. ]
  101. }