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.

411 lines
8.5 KiB

Fix terraform0.13 errors (#7077) * [terraform/aws] Fix Terraform >=0.13 warnings Terraform >=0.13 gives the following warning: ``` Warning: Interpolation-only expressions are deprecated ``` The fix was tested as follows: ``` rm -rf .terraform && terraform0.12.26 init && terraform0.12.26 validate rm -rf .terraform && terraform0.13.5 init && terraform0.13.5 validate rm -rf .terraform && terraform0.14.3 init && terraform0.14.3 validate ``` which gave no errors nor warnings. * [terraform/openstack] Fixes for Terraform >=0.13 Terraform >=0.13 gives the following error: ``` Error: Failed to install providers Could not find required providers, but found possible alternatives: hashicorp/openstack -> terraform-provider-openstack/openstack ``` This patch fixes these errors. This fix was tested as follows: ``` rm -rf .terraform && terraform0.12.26 init && terraform0.12.26 validate rm -rf .terraform && terraform0.13.5 init && terraform0.13.5 validate rm -rf .terraform && terraform0.14.3 init && terraform0.14.3 validate ``` which gave no errors nor warnings for Terraform 0.13.5 and Terraform 0.14.3. Unfortunately, 0.12.x gives a harmless warning, but with 0.14.3 out the door, I guess we need to move on. * [terraform/packet] Fixes for Terraform >=0.13 This fix was tested as follows: ``` export PACKET_AUTH_TOKEN=blah-blah rm -rf .terraform && terraform0.12.26 init && terraform0.12.26 validate rm -rf .terraform && terraform0.13.5 init && terraform0.13.5 validate rm -rf .terraform && terraform0.14.3 init && terraform0.14.3 validate ``` Errors are gone, but warnings still remain. It is impossible to please all three versions of Terraform. * Add tests for Terraform >=0.13
3 years ago
Fix terraform0.13 errors (#7077) * [terraform/aws] Fix Terraform >=0.13 warnings Terraform >=0.13 gives the following warning: ``` Warning: Interpolation-only expressions are deprecated ``` The fix was tested as follows: ``` rm -rf .terraform && terraform0.12.26 init && terraform0.12.26 validate rm -rf .terraform && terraform0.13.5 init && terraform0.13.5 validate rm -rf .terraform && terraform0.14.3 init && terraform0.14.3 validate ``` which gave no errors nor warnings. * [terraform/openstack] Fixes for Terraform >=0.13 Terraform >=0.13 gives the following error: ``` Error: Failed to install providers Could not find required providers, but found possible alternatives: hashicorp/openstack -> terraform-provider-openstack/openstack ``` This patch fixes these errors. This fix was tested as follows: ``` rm -rf .terraform && terraform0.12.26 init && terraform0.12.26 validate rm -rf .terraform && terraform0.13.5 init && terraform0.13.5 validate rm -rf .terraform && terraform0.14.3 init && terraform0.14.3 validate ``` which gave no errors nor warnings for Terraform 0.13.5 and Terraform 0.14.3. Unfortunately, 0.12.x gives a harmless warning, but with 0.14.3 out the door, I guess we need to move on. * [terraform/packet] Fixes for Terraform >=0.13 This fix was tested as follows: ``` export PACKET_AUTH_TOKEN=blah-blah rm -rf .terraform && terraform0.12.26 init && terraform0.12.26 validate rm -rf .terraform && terraform0.13.5 init && terraform0.13.5 validate rm -rf .terraform && terraform0.14.3 init && terraform0.14.3 validate ``` Errors are gone, but warnings still remain. It is impossible to please all three versions of Terraform. * Add tests for Terraform >=0.13
3 years ago
Fix terraform0.13 errors (#7077) * [terraform/aws] Fix Terraform >=0.13 warnings Terraform >=0.13 gives the following warning: ``` Warning: Interpolation-only expressions are deprecated ``` The fix was tested as follows: ``` rm -rf .terraform && terraform0.12.26 init && terraform0.12.26 validate rm -rf .terraform && terraform0.13.5 init && terraform0.13.5 validate rm -rf .terraform && terraform0.14.3 init && terraform0.14.3 validate ``` which gave no errors nor warnings. * [terraform/openstack] Fixes for Terraform >=0.13 Terraform >=0.13 gives the following error: ``` Error: Failed to install providers Could not find required providers, but found possible alternatives: hashicorp/openstack -> terraform-provider-openstack/openstack ``` This patch fixes these errors. This fix was tested as follows: ``` rm -rf .terraform && terraform0.12.26 init && terraform0.12.26 validate rm -rf .terraform && terraform0.13.5 init && terraform0.13.5 validate rm -rf .terraform && terraform0.14.3 init && terraform0.14.3 validate ``` which gave no errors nor warnings for Terraform 0.13.5 and Terraform 0.14.3. Unfortunately, 0.12.x gives a harmless warning, but with 0.14.3 out the door, I guess we need to move on. * [terraform/packet] Fixes for Terraform >=0.13 This fix was tested as follows: ``` export PACKET_AUTH_TOKEN=blah-blah rm -rf .terraform && terraform0.12.26 init && terraform0.12.26 validate rm -rf .terraform && terraform0.13.5 init && terraform0.13.5 validate rm -rf .terraform && terraform0.14.3 init && terraform0.14.3 validate ``` Errors are gone, but warnings still remain. It is impossible to please all three versions of Terraform. * Add tests for Terraform >=0.13
3 years ago
  1. variable "cluster_name" {
  2. default = "example"
  3. }
  4. variable "az_list" {
  5. description = "List of Availability Zones to use for masters in your OpenStack cluster"
  6. type = list(string)
  7. default = ["nova"]
  8. }
  9. variable "az_list_node" {
  10. description = "List of Availability Zones to use for nodes in your OpenStack cluster"
  11. type = list(string)
  12. default = ["nova"]
  13. }
  14. variable "number_of_bastions" {
  15. default = 1
  16. }
  17. variable "number_of_k8s_masters" {
  18. default = 2
  19. }
  20. variable "number_of_k8s_masters_no_etcd" {
  21. default = 2
  22. }
  23. variable "number_of_etcd" {
  24. default = 2
  25. }
  26. variable "number_of_k8s_masters_no_floating_ip" {
  27. default = 2
  28. }
  29. variable "number_of_k8s_masters_no_floating_ip_no_etcd" {
  30. default = 2
  31. }
  32. variable "number_of_k8s_nodes" {
  33. default = 1
  34. }
  35. variable "number_of_k8s_nodes_no_floating_ip" {
  36. default = 1
  37. }
  38. variable "number_of_gfs_nodes_no_floating_ip" {
  39. default = 0
  40. }
  41. variable "bastion_root_volume_size_in_gb" {
  42. default = 0
  43. }
  44. variable "etcd_root_volume_size_in_gb" {
  45. default = 0
  46. }
  47. variable "master_root_volume_size_in_gb" {
  48. default = 0
  49. }
  50. variable "node_root_volume_size_in_gb" {
  51. default = 0
  52. }
  53. variable "gfs_root_volume_size_in_gb" {
  54. default = 0
  55. }
  56. variable "gfs_volume_size_in_gb" {
  57. default = 75
  58. }
  59. variable "master_volume_type" {
  60. default = "Default"
  61. }
  62. variable "node_volume_type" {
  63. default = "Default"
  64. }
  65. variable "public_key_path" {
  66. description = "The path of the ssh pub key"
  67. default = "~/.ssh/id_rsa.pub"
  68. }
  69. variable "image" {
  70. description = "the image to use"
  71. default = ""
  72. }
  73. variable "image_gfs" {
  74. description = "Glance image to use for GlusterFS"
  75. default = ""
  76. }
  77. variable "ssh_user" {
  78. description = "used to fill out tags for ansible inventory"
  79. default = "ubuntu"
  80. }
  81. variable "ssh_user_gfs" {
  82. description = "used to fill out tags for ansible inventory"
  83. default = "ubuntu"
  84. }
  85. variable "flavor_bastion" {
  86. description = "Use 'openstack flavor list' command to see what your OpenStack instance uses for IDs"
  87. default = 3
  88. }
  89. variable "flavor_k8s_master" {
  90. description = "Use 'openstack flavor list' command to see what your OpenStack instance uses for IDs"
  91. default = 3
  92. }
  93. variable "flavor_k8s_node" {
  94. description = "Use 'openstack flavor list' command to see what your OpenStack instance uses for IDs"
  95. default = 3
  96. }
  97. variable "flavor_etcd" {
  98. description = "Use 'openstack flavor list' command to see what your OpenStack instance uses for IDs"
  99. default = 3
  100. }
  101. variable "flavor_gfs_node" {
  102. description = "Use 'openstack flavor list' command to see what your OpenStack instance uses for IDs"
  103. default = 3
  104. }
  105. variable "network_name" {
  106. description = "name of the internal network to use"
  107. default = "internal"
  108. }
  109. variable "use_existing_network" {
  110. description = "Use an existing network"
  111. type = bool
  112. default = "false"
  113. }
  114. variable "network_dns_domain" {
  115. description = "dns_domain for the internal network"
  116. type = string
  117. default = null
  118. }
  119. variable "use_neutron" {
  120. description = "Use neutron"
  121. default = 1
  122. }
  123. variable "port_security_enabled" {
  124. description = "Enable port security on the internal network"
  125. type = bool
  126. default = "true"
  127. }
  128. variable "force_null_port_security" {
  129. description = "Force port security to be null. Some providers does not allow setting port security"
  130. type = bool
  131. default = "false"
  132. }
  133. variable "subnet_cidr" {
  134. description = "Subnet CIDR block."
  135. type = string
  136. default = "10.0.0.0/24"
  137. }
  138. variable "dns_nameservers" {
  139. description = "An array of DNS name server names used by hosts in this subnet."
  140. type = list(string)
  141. default = []
  142. }
  143. variable "k8s_master_fips" {
  144. description = "specific pre-existing floating IPs to use for master nodes"
  145. type = list(string)
  146. default = []
  147. }
  148. variable "bastion_fips" {
  149. description = "specific pre-existing floating IPs to use for bastion node"
  150. type = list(string)
  151. default = []
  152. }
  153. variable "floatingip_pool" {
  154. description = "name of the floating ip pool to use"
  155. default = "external"
  156. }
  157. variable "wait_for_floatingip" {
  158. description = "Terraform will poll the instance until the floating IP has been associated."
  159. default = "false"
  160. }
  161. variable "external_net" {
  162. description = "uuid of the external/public network"
  163. }
  164. variable "supplementary_master_groups" {
  165. description = "supplementary kubespray ansible groups for masters, such kube_node"
  166. default = ""
  167. }
  168. variable "supplementary_node_groups" {
  169. description = "supplementary kubespray ansible groups for worker nodes, such as kube_ingress"
  170. default = ""
  171. }
  172. variable "bastion_allowed_remote_ips" {
  173. description = "An array of CIDRs allowed to SSH to hosts"
  174. type = list(string)
  175. default = ["0.0.0.0/0"]
  176. }
  177. variable "bastion_allowed_remote_ipv6_ips" {
  178. description = "An array of IPv6 CIDRs allowed to SSH to hosts"
  179. type = list(string)
  180. default = ["::/0"]
  181. }
  182. variable "master_allowed_remote_ips" {
  183. description = "An array of CIDRs allowed to access API of masters"
  184. type = list(string)
  185. default = ["0.0.0.0/0"]
  186. }
  187. variable "master_allowed_remote_ipv6_ips" {
  188. description = "An array of IPv6 CIDRs allowed to access API of masters"
  189. type = list(string)
  190. default = ["::/0"]
  191. }
  192. variable "k8s_allowed_remote_ips" {
  193. description = "An array of CIDRs allowed to SSH to hosts"
  194. type = list(string)
  195. default = []
  196. }
  197. variable "k8s_allowed_remote_ips_ipv6" {
  198. description = "An array of IPv6 CIDRs allowed to SSH to hosts"
  199. type = list(string)
  200. default = []
  201. }
  202. variable "k8s_allowed_egress_ips" {
  203. description = "An array of CIDRs allowed for egress traffic"
  204. type = list(string)
  205. default = ["0.0.0.0/0"]
  206. }
  207. variable "k8s_allowed_egress_ipv6_ips" {
  208. description = "An array of CIDRs allowed for egress IPv6 traffic"
  209. type = list(string)
  210. default = ["::/0"]
  211. }
  212. variable "master_allowed_ports" {
  213. type = list(any)
  214. default = []
  215. }
  216. variable "master_allowed_ports_ipv6" {
  217. type = list(any)
  218. default = []
  219. }
  220. variable "worker_allowed_ports" {
  221. type = list(any)
  222. default = [
  223. {
  224. "protocol" = "tcp"
  225. "port_range_min" = 30000
  226. "port_range_max" = 32767
  227. "remote_ip_prefix" = "0.0.0.0/0"
  228. },
  229. ]
  230. }
  231. variable "worker_allowed_ports_ipv6" {
  232. type = list(any)
  233. default = [
  234. {
  235. "protocol" = "tcp"
  236. "port_range_min" = 30000
  237. "port_range_max" = 32767
  238. "remote_ip_prefix" = "::/0"
  239. },
  240. ]
  241. }
  242. variable "bastion_allowed_ports" {
  243. type = list(any)
  244. default = []
  245. }
  246. variable "bastion_allowed_ports_ipv6" {
  247. type = list(any)
  248. default = []
  249. }
  250. variable "use_access_ip" {
  251. default = 1
  252. }
  253. variable "master_server_group_policy" {
  254. description = "desired server group policy, e.g. anti-affinity"
  255. default = ""
  256. }
  257. variable "node_server_group_policy" {
  258. description = "desired server group policy, e.g. anti-affinity"
  259. default = ""
  260. }
  261. variable "etcd_server_group_policy" {
  262. description = "desired server group policy, e.g. anti-affinity"
  263. default = ""
  264. }
  265. variable "router_id" {
  266. description = "uuid of an externally defined router to use"
  267. default = null
  268. }
  269. variable "router_internal_port_id" {
  270. description = "uuid of the port connection our router to our network"
  271. default = null
  272. }
  273. variable "k8s_masters" {
  274. default = {}
  275. }
  276. variable "k8s_nodes" {
  277. default = {}
  278. }
  279. variable "additional_server_groups" {
  280. default = {}
  281. type = map(object({
  282. policy = string
  283. }))
  284. }
  285. variable "extra_sec_groups" {
  286. default = false
  287. }
  288. variable "extra_sec_groups_name" {
  289. default = "custom"
  290. }
  291. variable "image_uuid" {
  292. description = "uuid of image inside openstack to use"
  293. default = ""
  294. }
  295. variable "image_gfs_uuid" {
  296. description = "uuid of image to be used on gluster fs nodes. If empty defaults to image_uuid"
  297. default = ""
  298. }
  299. variable "image_master" {
  300. description = "uuid of image inside openstack to use"
  301. default = ""
  302. }
  303. variable "image_master_uuid" {
  304. description = "uuid of image to be used on master nodes. If empty defaults to image_uuid"
  305. default = ""
  306. }
  307. variable "group_vars_path" {
  308. description = "path to the inventory group vars directory"
  309. type = string
  310. default = "./group_vars"
  311. }
  312. variable "k8s_master_loadbalancer_enabled" {
  313. type = bool
  314. default = "false"
  315. }
  316. variable "k8s_master_loadbalancer_listener_port" {
  317. type = string
  318. default = "6443"
  319. }
  320. variable "k8s_master_loadbalancer_server_port" {
  321. type = string
  322. default = 6443
  323. }
  324. variable "k8s_master_loadbalancer_public_ip" {
  325. type = string
  326. default = ""
  327. }