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.

144 lines
3.1 KiB

  1. variable "prefix" {
  2. type = string
  3. default = "kubespray"
  4. description = "Prefix that is used to distinguish these resources from others"
  5. }
  6. variable "zone" {
  7. description = "The zone where to run the cluster"
  8. }
  9. variable "template_name" {
  10. description = "Block describing the preconfigured operating system"
  11. }
  12. variable "username" {
  13. description = "The username to use for the nodes"
  14. default = "ubuntu"
  15. }
  16. variable "private_network_cidr" {
  17. description = "CIDR to use for the private network"
  18. default = "172.16.0.0/24"
  19. }
  20. variable "machines" {
  21. description = "Cluster machines"
  22. type = map(object({
  23. node_type = string
  24. plan = string
  25. cpu = string
  26. mem = string
  27. disk_size = number
  28. additional_disks = map(object({
  29. size = number
  30. tier = string
  31. }))
  32. }))
  33. }
  34. variable "ssh_public_keys" {
  35. description = "List of public SSH keys which are injected into the VMs."
  36. type = list(string)
  37. }
  38. variable "inventory_file" {
  39. description = "Where to store the generated inventory file"
  40. }
  41. variable "UPCLOUD_USERNAME" {
  42. description = "UpCloud username with API access"
  43. }
  44. variable "UPCLOUD_PASSWORD" {
  45. description = "Password for UpCloud API user"
  46. }
  47. variable "firewall_enabled" {
  48. description = "Enable firewall rules"
  49. default = false
  50. }
  51. variable "master_allowed_remote_ips" {
  52. description = "List of IP start/end addresses allowed to access API of masters"
  53. type = list(object({
  54. start_address = string
  55. end_address = string
  56. }))
  57. default = []
  58. }
  59. variable "k8s_allowed_remote_ips" {
  60. description = "List of IP start/end addresses allowed to SSH to hosts"
  61. type = list(object({
  62. start_address = string
  63. end_address = string
  64. }))
  65. default = []
  66. }
  67. variable "master_allowed_ports" {
  68. description = "List of ports to allow on masters"
  69. type = list(object({
  70. protocol = string
  71. port_range_min = number
  72. port_range_max = number
  73. start_address = string
  74. end_address = string
  75. }))
  76. }
  77. variable "worker_allowed_ports" {
  78. description = "List of ports to allow on workers"
  79. type = list(object({
  80. protocol = string
  81. port_range_min = number
  82. port_range_max = number
  83. start_address = string
  84. end_address = string
  85. }))
  86. }
  87. variable "firewall_default_deny_in" {
  88. description = "Add firewall policies that deny all inbound traffic by default"
  89. default = false
  90. }
  91. variable "firewall_default_deny_out" {
  92. description = "Add firewall policies that deny all outbound traffic by default"
  93. default = false
  94. }
  95. variable "loadbalancer_enabled" {
  96. description = "Enable load balancer"
  97. default = false
  98. }
  99. variable "loadbalancer_plan" {
  100. description = "Load balancer plan (development/production-small)"
  101. default = "development"
  102. }
  103. variable "loadbalancers" {
  104. description = "Load balancers"
  105. type = map(object({
  106. port = number
  107. target_port = number
  108. backend_servers = list(string)
  109. }))
  110. default = {}
  111. }
  112. variable "server_groups" {
  113. description = "Server groups"
  114. type = map(object({
  115. anti_affinity = bool
  116. servers = list(string)
  117. }))
  118. default = {}
  119. }