mirror of
https://github.com/jpetazzo/container.training.git
synced 2026-05-05 16:36:45 +00:00
GCP quotas are fairly limited (on my account, I can only use 8 public IP addresses per zone, which means that I cannot deploy many public clusters in a single zone). I tried to use private clusters, but that causes other problems. This refactoring makes it possible to spread clusters across multiple zones. Since I have access to 20+ zones in Europe and 20+ zones in the US, this lets me create a lot of public clusters and simplifies the module quite a bit.
41 lines
765 B
HCL
41 lines
765 B
HCL
variable "how_many_clusters" {
|
|
type = number
|
|
default = 1
|
|
}
|
|
|
|
variable "node_size" {
|
|
type = string
|
|
default = "M"
|
|
# Can be S, M, L.
|
|
# We map these values to different specific instance types for each provider,
|
|
# but the idea is that they shoudl correspond to the following sizes:
|
|
# S = 2 GB RAM
|
|
# M = 4 GB RAM
|
|
# L = 8 GB RAM
|
|
}
|
|
|
|
variable "min_nodes_per_pool" {
|
|
type = number
|
|
default = 1
|
|
}
|
|
|
|
variable "max_nodes_per_pool" {
|
|
type = number
|
|
default = 0
|
|
}
|
|
|
|
variable "enable_arm_pool" {
|
|
type = bool
|
|
default = false
|
|
}
|
|
|
|
variable "location" {
|
|
type = string
|
|
default = null
|
|
}
|
|
|
|
# TODO: perhaps handle if it's space-separated instead of newline?
|
|
locals {
|
|
locations = var.location == null ? [null] : split("\n", var.location)
|
|
}
|