mirror of
https://github.com/jpetazzo/container.training.git
synced 2026-05-20 15:52:55 +00:00
This should make it easy to start a bunch of clusters (using the new Terraform provisioning method) on various providers.
59 lines
1009 B
HCL
59 lines
1009 B
HCL
variable "cluster_name" {
|
|
type = string
|
|
default = "deployed-with-terraform"
|
|
}
|
|
|
|
variable "common_tags" {
|
|
type = list(string)
|
|
default = []
|
|
}
|
|
|
|
variable "node_size" {
|
|
type = string
|
|
default = "M"
|
|
}
|
|
|
|
variable "min_nodes_per_pool" {
|
|
type = number
|
|
default = 2
|
|
}
|
|
|
|
variable "max_nodes_per_pool" {
|
|
type = number
|
|
default = 5
|
|
}
|
|
|
|
# FIXME
|
|
variable "enable_arm_pool" {
|
|
type = bool
|
|
default = false
|
|
}
|
|
|
|
variable "node_types" {
|
|
type = map(string)
|
|
default = {
|
|
"S" = "e2-small"
|
|
"M" = "e2-medium"
|
|
"L" = "e2-standard-2"
|
|
}
|
|
}
|
|
|
|
locals {
|
|
node_type = var.node_types[var.node_size]
|
|
}
|
|
|
|
# To view supported locations, run:
|
|
# gcloud compute zones list
|
|
variable "location" {
|
|
type = string
|
|
default = null
|
|
}
|
|
|
|
# To view supported versions, run:
|
|
# gcloud container get-server-config --region=europe-north1 '--format=flattened(channels)'
|
|
# But it's also possible to just specify e.g. "1.20" and it figures it out.
|
|
variable "k8s_version" {
|
|
type = string
|
|
default = "1.21"
|
|
}
|