From 553d3243d96a67c8a20eaf6b9c05405bc4433546 Mon Sep 17 00:00:00 2001 From: Colin Saliceti Date: Tue, 31 Dec 2024 11:39:32 +0000 Subject: [PATCH] wip --- aks/cluster_data/outputs.tf | 2 +- aks/cluster_data/variables.tf | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/aks/cluster_data/outputs.tf b/aks/cluster_data/outputs.tf index 079c8cf..7323d2f 100644 --- a/aks/cluster_data/outputs.tf +++ b/aks/cluster_data/outputs.tf @@ -34,7 +34,7 @@ output "kubelogin_args" { description = "Kubelogin arguments to use configure the kubernetes provider. Allows workload identity, service principal secret and azure cli" # If running in github actions, use either spn secret authentication or workload identity. If not, use azure cli. value = (local.running_in_github_actions ? ( - local.spn_secret_authentication ? + local.using_spn_secret ? local.kubelogin_args_map["spn"] : local.kubelogin_args_map["workloadidentity"] ) : diff --git a/aks/cluster_data/variables.tf b/aks/cluster_data/variables.tf index ff400eb..046c643 100644 --- a/aks/cluster_data/variables.tf +++ b/aks/cluster_data/variables.tf @@ -105,5 +105,5 @@ locals { azure_RBAC_enabled = length(data.azurerm_kubernetes_cluster.main.azure_active_directory_role_based_access_control) > 0 running_in_github_actions = contains(keys(data.environment_variables.github_actions.items), "GITHUB_ACTIONS") - spn_secret_authentication = contains(keys(data.environment_variables.spn_secret.items), "AAD_SERVICE_PRINCIPAL_CLIENT_SECRET") + using_spn_secret = contains(keys(data.environment_variables.spn_secret.items), "AAD_SERVICE_PRINCIPAL_CLIENT_SECRET") }