From de6d9e9d7ea93a6526883cc3af5d7ec77fcacba6 Mon Sep 17 00:00:00 2001 From: Lorenzo Garuti Date: Mon, 23 May 2022 11:28:25 +0200 Subject: [PATCH] Removed spaces in the backend name. Added workaround for issue #4. fixes #4 --- k3slb.tf | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/k3slb.tf b/k3slb.tf index 32d2b42..a620607 100644 --- a/k3slb.tf +++ b/k3slb.tf @@ -27,7 +27,7 @@ resource "oci_network_load_balancer_backend_set" "k3s_kube_api_backend_set" { port = var.kube_api_port } - name = "k3s kube api backend" + name = "k3s_kube_api_backend" network_load_balancer_id = oci_network_load_balancer_network_load_balancer.k3s_load_balancer.id policy = "FIVE_TUPLE" is_preserve_source = true @@ -41,7 +41,7 @@ resource "oci_network_load_balancer_backend" "k3s_kube_api_backend" { count = var.k3s_server_pool_size backend_set_name = oci_network_load_balancer_backend_set.k3s_kube_api_backend_set.name network_load_balancer_id = oci_network_load_balancer_network_load_balancer.k3s_load_balancer.id + name = format("%s:%s", data.oci_core_instance_pool_instances.k3s_servers_instances.instances[count.index].id, var.kube_api_port) port = var.kube_api_port - - target_id = data.oci_core_instance_pool_instances.k3s_servers_instances.instances[count.index].id + target_id = data.oci_core_instance_pool_instances.k3s_servers_instances.instances[count.index].id } \ No newline at end of file