From 67faa16ab7d1f95b029c277b0c17e0171de9abb3 Mon Sep 17 00:00:00 2001 From: jonny Date: Fri, 11 Mar 2022 12:19:57 +0100 Subject: [PATCH] fix deprecated waring, switched to local_Sensitive_file for kubeconfig --- kubeconfig.tf | 4 ++-- main.tf | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/kubeconfig.tf b/kubeconfig.tf index 73c1faa..67832b3 100644 --- a/kubeconfig.tf +++ b/kubeconfig.tf @@ -23,8 +23,8 @@ locals { } } -resource "local_file" "kubeconfig" { - sensitive_content = local.kubeconfig_external +resource "local_sensitive_file" "kubeconfig" { + content = local.kubeconfig_external filename = "kubeconfig.yaml" file_permission = "600" } diff --git a/main.tf b/main.tf index ced89b9..e074930 100644 --- a/main.tf +++ b/main.tf @@ -68,7 +68,7 @@ resource "null_resource" "destroy_traefik_loadbalancer" { } depends_on = [ - local_file.kubeconfig, + local_sensitive_file.kubeconfig, null_resource.control_planes[0], hcloud_network_subnet.subnet, hcloud_network.k3s,