Skip to content
Snippets Groups Projects

Support for RKE2 and K3S

Merged Rob Kooper requested to merge rke2-k3s into main
6 files
+ 86
37
Compare changes
  • Side-by-side
  • Inline
Files
6
# Each cluster will either have a shared key, or their own
# unique key.
resource "openstack_compute_keypair_v2" "key" {
#count = 1 #var.openstack_ssh_key == "" ? 0 : 1
count = var.openstack_ssh_key == "" ? 1 : 0
name = var.cluster_name
}
data "openstack_compute_keypair_v2" "key" {
count = var.openstack_ssh_key == "" ? 0 : 1
name = var.openstack_ssh_key
}
# set local variable to hold final key, either created or
# loaded.
locals {
key = var.cluster_name # var.openstack_ssh_key == "" ? var.cluster_name : var.openstack_ssh_key
key_name = var.openstack_ssh_key == "" ? openstack_compute_keypair_v2.key[0].name : data.openstack_compute_keypair_v2.key[0].name
private_key = var.openstack_ssh_key == "" ? openstack_compute_keypair_v2.key[0].private_key : ""
}
Loading