You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

90 lines
2.9 KiB

7 years ago
  1. {
  2. "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
  3. "contentVersion": "1.0.0.0",
  4. "parameters": {
  5. "catalogstorage": {
  6. "type": "string"
  7. },
  8. "profileName" : {
  9. "type": "string"
  10. }
  11. },
  12. "variables": {
  13. "catalogstorage": "[concat(parameters('catalogstorage'), uniqueString(resourceGroup().id))]",
  14. "endpointName": "[concat('endpoint-', uniqueString(resourceGroup().id))]",
  15. "profileName": "[parameters('profileName')]"
  16. },
  17. "resources": [
  18. {
  19. "type": "Microsoft.Storage/storageAccounts",
  20. "name": "[variables('catalogstorage')]",
  21. "apiVersion": "2016-01-01",
  22. "location": "[resourceGroup().location]",
  23. "tags": {
  24. "displayName": "[variables('catalogstorage')]"
  25. },
  26. "sku": {
  27. "name": "Standard_LRS"
  28. },
  29. "kind": "Storage"
  30. },
  31. {
  32. "name": "[variables('profileName')]",
  33. "type": "Microsoft.Cdn/profiles",
  34. "location": "[resourceGroup().location]",
  35. "apiVersion": "2016-04-02",
  36. "tags": {
  37. "displayName": "[variables('profileName')]"
  38. },
  39. "sku": {
  40. "name": "Standard_Verizon"
  41. },
  42. "resources": [
  43. {
  44. "apiVersion": "2016-04-02",
  45. "name": "[variables('endpointName')]",
  46. "type": "endpoints",
  47. "dependsOn": [
  48. "[variables('profileName')]",
  49. "[variables('catalogstorage')]"
  50. ],
  51. "location": "[resourceGroup().location]",
  52. "tags": {
  53. "displayName": "[variables('endpointName')]"
  54. },
  55. "properties": {
  56. "originHostHeader": "[replace(replace(reference(resourceId('Microsoft.Storage/storageAccounts', variables('catalogstorage')),'2015-06-15' ).primaryEndpoints.blob,'https://',''),'/','')]",
  57. "isHttpAllowed": true,
  58. "isHttpsAllowed": true,
  59. "queryStringCachingBehavior": "IgnoreQueryString",
  60. "contentTypesToCompress": [
  61. "text/plain",
  62. "text/html",
  63. "text/css",
  64. "application/x-javascript",
  65. "text/javascript"
  66. ],
  67. "isCompressionEnabled": "True",
  68. "origins": [
  69. {
  70. "name": "origin1",
  71. "properties": {
  72. "hostName": "[replace(replace(reference(resourceId('Microsoft.Storage/storageAccounts', variables('catalogstorage')),'2015-06-15' ).primaryEndpoints.blob,'https://',''),'/','')]"
  73. }
  74. }
  75. ]
  76. }
  77. }
  78. ]
  79. }
  80. ],
  81. "outputs": {
  82. "hostName": {
  83. "type": "string",
  84. "value": "[reference(resourceId('Microsoft.cdn/profiles/endpoints', variables('profileName'), variables('endpointName'))).hostName]"
  85. },
  86. "originHostHeader": {
  87. "type": "string",
  88. "value": "[reference(resourceId('Microsoft.cdn/profiles/endpoints', variables('profileName'), variables('endpointName'))).originHostHeader]"
  89. }
  90. }
  91. }