From 5c4e427452b9d86c68ef45f3dd8d7c8d6594de13 Mon Sep 17 00:00:00 2001 From: Krzysztof Kwiatosz Date: Thu, 3 Oct 2024 15:03:14 +0200 Subject: [PATCH] Fix base64 decoding (#41) --- main.tf | 2 +- output.tf | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/main.tf b/main.tf index 6decc22..465b0a7 100644 --- a/main.tf +++ b/main.tf @@ -100,7 +100,7 @@ resource "terraform_data" "wait-for-kyma-readiness" { while ! kubectl get kyma default -n kyma-system --kubeconfig $KUBECONFIG; do echo "Waiting for default kyma CR..."; sleep 1; done kubectl wait --for='jsonpath={.status.state}=Ready' kymas.operator.kyma-project.io/default -n kyma-system --kubeconfig $KUBECONFIG --timeout=480s while ! kubectl get secret sap-btp-operator-clusterid -n kyma-system --kubeconfig $KUBECONFIG; do echo "Waiting for sap-btp-operator-clusterid..."; sleep 1; done - kubectl get secret sap-btp-operator-clusterid -n kyma-system -ojsonpath={.data.INITIAL_CLUSTER_ID} --kubeconfig $KUBECONFIG | base64 -D > cluster_id.txt + kubectl get secret sap-btp-operator-clusterid -n kyma-system -ojsonpath={.data.INITIAL_CLUSTER_ID} --kubeconfig $KUBECONFIG > cluster_id.txt while ! kubectl get cm shoot-info -n kube-system --kubeconfig $KUBECONFIG; do echo "Waiting for shoot-info cm..."; sleep 1; done kubectl get cm shoot-info -n kube-system -ojsonpath={.data.domain} --kubeconfig $KUBECONFIG > domain.txt ) diff --git a/output.tf b/output.tf index 4087192..24a1d3f 100644 --- a/output.tf +++ b/output.tf @@ -11,7 +11,7 @@ output "service_instance_id" { } output "cluster_id" { - value = data.local_file.cluster_id.content + value = base64decode(data.local_file.cluster_id.content) } output "domain" {