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.

108 lines
3.4 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": "firewallrules",
  79. "name": "AllowAllWindowsAzureIps",
  80. "apiVersion": "2014-04-01-preview",
  81. "location": "[resourceGroup().location]",
  82. "properties": {
  83. "startIpAddress": "0.0.0.0",
  84. "endIpAddress": "0.0.0.0"
  85. },
  86. "dependsOn": [
  87. "[concat('Microsoft.Sql/servers/', variables('sql_server_name'))]"
  88. ]
  89. },
  90. {
  91. "type": "firewallrules",
  92. "name": "AllConnectionsAllowed",
  93. "apiVersion": "2014-04-01-preview",
  94. "location": "[resourceGroup().location]",
  95. "properties": {
  96. "startIpAddress": "0.0.0.0",
  97. "endIpAddress": "255.255.255.255"
  98. },
  99. "dependsOn": [
  100. "[concat('Microsoft.Sql/servers/', variables('sql_server_name'))]"
  101. ]
  102. }
  103. ]
  104. }
  105. ],
  106. "outputs": {
  107. }
  108. }