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.

123 lines
3.9 KiB

  1. {
  2. "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
  3. "contentVersion": "1.0.0.0",
  4. "parameters": {
  5. "sql_server": {
  6. "type": "object"
  7. },
  8. "admin": {
  9. "type": "string"
  10. },
  11. "adminpwd": {
  12. "type": "string"
  13. }
  14. },
  15. "variables": {
  16. "sql_server_name": "[concat(parameters('sql_server').name, '-', uniqueString(resourceGroup().id))]",
  17. "admin": "[parameters('admin')]",
  18. "adminpwd": "[parameters('adminpwd')]"
  19. },
  20. "resources": [
  21. {
  22. "type": "Microsoft.Sql/servers",
  23. "name": "[variables('sql_server_name')]",
  24. "apiVersion": "2014-04-01-preview",
  25. "location": "[resourceGroup().location]",
  26. "properties": {
  27. "administratorLogin": "[variables('admin')]",
  28. "administratorLoginPassword": "[variables('adminpwd')]",
  29. "version": "12.0"
  30. },
  31. "resources": [
  32. {
  33. "type": "databases",
  34. "name": "[parameters('sql_server').dbs.ordering]",
  35. "apiVersion": "2014-04-01-preview",
  36. "location": "[resourceGroup().location]",
  37. "properties": {
  38. "edition": "Standard",
  39. "collation": "SQL_Latin1_General_CP1_CI_AS",
  40. "maxSizeBytes": "1073741824",
  41. "requestedServiceObjectiveName": "S1"
  42. },
  43. "dependsOn": [
  44. "[concat('Microsoft.Sql/servers/', variables('sql_server_name'))]"
  45. ]
  46. },
  47. {
  48. "type": "databases",
  49. "name": "[parameters('sql_server').dbs.identity]",
  50. "apiVersion": "2014-04-01-preview",
  51. "location": "[resourceGroup().location]",
  52. "properties": {
  53. "edition": "Standard",
  54. "collation": "SQL_Latin1_General_CP1_CI_AS",
  55. "maxSizeBytes": "1073741824",
  56. "requestedServiceObjectiveName": "S1"
  57. },
  58. "dependsOn": [
  59. "[concat('Microsoft.Sql/servers/', variables('sql_server_name'))]"
  60. ]
  61. },
  62. {
  63. "type": "databases",
  64. "name": "[parameters('sql_server').dbs.catalog]",
  65. "apiVersion": "2014-04-01-preview",
  66. "location": "[resourceGroup().location]",
  67. "properties": {
  68. "edition": "Standard",
  69. "collation": "SQL_Latin1_General_CP1_CI_AS",
  70. "maxSizeBytes": "1073741824",
  71. "requestedServiceObjectiveName": "S1"
  72. },
  73. "dependsOn": [
  74. "[concat('Microsoft.Sql/servers/', variables('sql_server_name'))]"
  75. ]
  76. },
  77. {
  78. "type": "databases",
  79. "name": "[parameters('sql_server').dbs.marketing]",
  80. "apiVersion": "2014-04-01-preview",
  81. "location": "[resourceGroup().location]",
  82. "properties": {
  83. "edition": "Standard",
  84. "collation": "SQL_Latin1_General_CP1_CI_AS",
  85. "maxSizeBytes": "1073741824",
  86. "requestedServiceObjectiveName": "S1"
  87. },
  88. "dependsOn": [
  89. "[concat('Microsoft.Sql/servers/', variables('sql_server_name'))]"
  90. ]
  91. },
  92. {
  93. "type": "firewallrules",
  94. "name": "AllowAllWindowsAzureIps",
  95. "apiVersion": "2014-04-01-preview",
  96. "location": "[resourceGroup().location]",
  97. "properties": {
  98. "startIpAddress": "0.0.0.0",
  99. "endIpAddress": "0.0.0.0"
  100. },
  101. "dependsOn": [
  102. "[concat('Microsoft.Sql/servers/', variables('sql_server_name'))]"
  103. ]
  104. },
  105. {
  106. "type": "firewallrules",
  107. "name": "AllConnectionsAllowed",
  108. "apiVersion": "2014-04-01-preview",
  109. "location": "[resourceGroup().location]",
  110. "properties": {
  111. "startIpAddress": "0.0.0.0",
  112. "endIpAddress": "255.255.255.255"
  113. },
  114. "dependsOn": [
  115. "[concat('Microsoft.Sql/servers/', variables('sql_server_name'))]"
  116. ]
  117. }
  118. ]
  119. }
  120. ],
  121. "outputs": {
  122. }
  123. }