b77460ec34
* contrib/terraform/exoscale: Rework SSH public keys Exoscale has a few limitations with `exoscale_ssh_keypair` resources. Creating several clusters with these scripts may lead to an error like: ``` Error: API error ParamError 431 (InvalidParameterValueException 4350): The key pair "lj-sc-ssh-key" already has this fingerprint ``` This patch reworks handling of SSH public keys. Specifically, we rely on the more cloud-agnostic way of configuring SSH public keys via `cloud-init`. * contrib/terraform/exoscale: terraform fmt * contrib/terraform/exoscale: Add terraform validate * contrib/terraform/exoscale: Inline public SSH keys The Terraform scripts need to install some SSH key, so that Kubespray (i.e., the "Ansible part") can take over. Initially, we pointed the Terraform scripts to `~/.ssh/id_rsa.pub`. This proved to be suboptimal: Operators sharing responbility for a cluster risk unnecessarily replacing resources. Therefore, it has been determined that it's best to inline the public SSH keys. The chosen variable `ssh_public_keys` provides some uniformity with `contrib/azurerm`. * Fix Terraform Exoscale test * Fix Terraform 0.14 test
42 lines
853 B
HCL
42 lines
853 B
HCL
variable "zone" {
|
|
type = string
|
|
# This is currently the only zone that is supposed to be supporting
|
|
# so called "managed private networks".
|
|
# See: https://www.exoscale.com/syslog/introducing-managed-private-networks
|
|
default = "ch-gva-2"
|
|
}
|
|
|
|
variable "prefix" {}
|
|
|
|
variable "machines" {
|
|
type = map(object({
|
|
node_type = string
|
|
size = string
|
|
boot_disk = object({
|
|
image_name = string
|
|
root_partition_size = number
|
|
ceph_partition_size = number
|
|
node_local_partition_size = number
|
|
})
|
|
}))
|
|
}
|
|
|
|
variable "ssh_public_keys" {
|
|
type = list(string)
|
|
}
|
|
|
|
variable "ssh_whitelist" {
|
|
type = list(string)
|
|
}
|
|
|
|
variable "api_server_whitelist" {
|
|
type = list(string)
|
|
}
|
|
|
|
variable "nodeport_whitelist" {
|
|
type = list(string)
|
|
}
|
|
|
|
variable "private_network_cidr" {
|
|
default = "172.0.10.0/24"
|
|
}
|