Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
saliceti committed Dec 31, 2024
1 parent 8e9127f commit 553d324
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion aks/cluster_data/outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
) :
Expand Down
2 changes: 1 addition & 1 deletion aks/cluster_data/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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")
}

0 comments on commit 553d324

Please sign in to comment.