kubespray/contrib/terraform
Cristian Klein b77460ec34
contrib/terraform/exoscale: Rework SSH public keys (#7242)
* 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
2021-02-03 07:32:28 -08:00
..
aws Fix markdown failures on contrib/terraform (#7082) 2020-12-25 12:10:27 -08:00
exoscale contrib/terraform/exoscale: Rework SSH public keys (#7242) 2021-02-03 07:32:28 -08:00
gcp Fix markdownlint failures under ./roles/ (#7089) 2020-12-30 05:07:49 -08:00
openstack Document the terraform option `master_allowed_ports` (#7196) 2021-01-21 07:55:06 -08:00
packet Fix markdown failures on contrib/terraform (#7082) 2020-12-25 12:10:27 -08:00
OWNERS Add OWNERS to contrib/terraform (#4441) 2019-04-08 00:36:24 -07:00
group_vars [contrib/terraform/openstack] Backward compatibility changes (#2539) 2018-04-30 18:11:07 +03:00
terraform.py Remove support for CoreOS Container Linux (#6576) 2020-08-28 02:28:53 -07:00