Skip to content

Commit 8d45514

Browse files
committed
fix(iac): K3s - fix kubeconfig downloading to wrong path
1 parent cb13c13 commit 8d45514

File tree

1 file changed

+3
-3
lines changed
  • deployment/terraform/modules/openstack-kubernetes-infra

1 file changed

+3
-3
lines changed

deployment/terraform/modules/openstack-kubernetes-infra/compute.tf

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -146,9 +146,9 @@ resource "null_resource" "copy_kubeconfig" {
146146
# Use ssh-keyscan to prevent interactive prompt on unknown host
147147
# Use sed to replace the localhost address in the KUBECONFIG file with the actual IP adddress of the created VM.
148148
command = <<EOT
149-
mkdir -p ${path.module}/.build/ && \
150-
ssh-keyscan -H ${openstack_compute_instance_v2.kubernetes_server.access_ip_v4} >> ${path.module}/.build/.known_hosts_cogstack && \
151-
scp -o UserKnownHostsFile=${path.module}/.build/.known_hosts_cogstack -o StrictHostKeyChecking=yes \
149+
mkdir -p ${path.root}/.build/ && \
150+
ssh-keyscan -H ${openstack_compute_instance_v2.kubernetes_server.access_ip_v4} >> ${path.root}/.build/.known_hosts_cogstack && \
151+
scp -o UserKnownHostsFile=${path.root}/.build/.known_hosts_cogstack -o StrictHostKeyChecking=yes \
152152
-i ${local.ssh_keys.private_key_file} \
153153
ubuntu@${openstack_compute_instance_v2.kubernetes_server.access_ip_v4}:/etc/rancher/k3s/k3s.yaml \
154154
${local.kubeconfig_file} && \

0 commit comments

Comments
 (0)