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.1 KiB

  1. {
  2. "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
  3. "contentVersion": "1.0.0.0",
  4. "parameters": {
  5. },
  6. "variables": {
  7. },
  8. "resources": [
  9. {
  10. "apiVersion": "{{apiVersion}}",
  11. "type": "Microsoft.Network/routeTables",
  12. "name": "{{routeTableName}}",
  13. "location": "[resourceGroup().location]",
  14. "properties": {
  15. "routes": [
  16. ]
  17. }
  18. },
  19. {
  20. "type": "Microsoft.Network/virtualNetworks",
  21. "name": "{{virtualNetworkName}}",
  22. "location": "[resourceGroup().location]",
  23. "apiVersion": "{{apiVersion}}",
  24. "dependsOn": [
  25. "[concat('Microsoft.Network/routeTables/', '{{routeTableName}}')]"
  26. ],
  27. "properties": {
  28. "addressSpace": {
  29. "addressPrefixes": [
  30. "{{azure_vnet_cidr}}"
  31. ]
  32. },
  33. "subnets": [
  34. {
  35. "name": "{{subnetMastersName}}",
  36. "properties": {
  37. "addressPrefix": "{{azure_masters_cidr}}",
  38. "routeTable": {
  39. "id": "[resourceId('Microsoft.Network/routeTables', '{{routeTableName}}')]"
  40. }
  41. }
  42. },
  43. {
  44. "name": "{{subnetMinionsName}}",
  45. "properties": {
  46. "addressPrefix": "{{azure_minions_cidr}}",
  47. "routeTable": {
  48. "id": "[resourceId('Microsoft.Network/routeTables', '{{routeTableName}}')]"
  49. }
  50. }
  51. }
  52. {% if use_bastion %}
  53. ,{
  54. "name": "{{subnetAdminName}}",
  55. "properties": {
  56. "addressPrefix": "{{azure_admin_cidr}}",
  57. "routeTable": {
  58. "id": "[resourceId('Microsoft.Network/routeTables', '{{routeTableName}}')]"
  59. }
  60. }
  61. }
  62. {% endif %}
  63. ]
  64. }
  65. },
  66. {
  67. "apiVersion": "{{apiVersion}}",
  68. "type": "Microsoft.Network/networkSecurityGroups",
  69. "name": "{{securityGroupName}}",
  70. "location": "[resourceGroup().location]",
  71. "properties": {
  72. "securityRules": [
  73. {% if not use_bastion %}
  74. {
  75. "name": "ssh",
  76. "properties": {
  77. "description": "Allow SSH",
  78. "protocol": "Tcp",
  79. "sourcePortRange": "*",
  80. "destinationPortRange": "22",
  81. "sourceAddressPrefix": "Internet",
  82. "destinationAddressPrefix": "*",
  83. "access": "Allow",
  84. "priority": 100,
  85. "direction": "Inbound"
  86. }
  87. },
  88. {% endif %}
  89. {
  90. "name": "kube-api",
  91. "properties": {
  92. "description": "Allow secure kube-api",
  93. "protocol": "Tcp",
  94. "sourcePortRange": "*",
  95. "destinationPortRange": "443",
  96. "sourceAddressPrefix": "Internet",
  97. "destinationAddressPrefix": "*",
  98. "access": "Allow",
  99. "priority": 101,
  100. "direction": "Inbound"
  101. }
  102. }
  103. ]
  104. },
  105. "resources": [],
  106. "dependsOn": []
  107. }
  108. ]
  109. }