From ca64e9756339633a3c40370efb7f931ba340dfdb Mon Sep 17 00:00:00 2001 From: phaer Date: Sat, 12 Feb 2022 00:32:11 +0100 Subject: [PATCH] split provisioning for better logging --- master.tf | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/master.tf b/master.tf index f92cb32..1c77478 100644 --- a/master.tf +++ b/master.tf @@ -135,11 +135,17 @@ resource "hcloud_server" "first_control_plane" { destination = "/tmp/post_install/traefik.yaml" } - # Deploy our post-installation kustomization + # Deploy secrets, logging is automatically disabled due to sensitive variables provisioner "remote-exec" { inline = [ "kubectl -n kube-system create secret generic hcloud --from-literal=token=${var.hcloud_token} --from-literal=network=${hcloud_network.k3s.name}", "kubectl -n kube-system create secret generic hcloud-csi --from-literal=token=${var.hcloud_token}", + ] + } + + # Deploy our post-installation kustomization + provisioner "remote-exec" { + inline = [ "kubectl apply -k /tmp/post_install", "rm -rf /tmp/post_install" ]