Skip to content

Commit

Permalink
Merge pull request #348 from blinqas/fix-issue-github-federated-identity
Browse files Browse the repository at this point in the history
Fix missing ARM_CLIENT_ID and ARM_TENANT_ID vars who is required when…
  • Loading branch information
LaurentLesle committed Dec 19, 2023
2 parents fecd567 + 17a8b5b commit 6a2576d
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion scripts/functions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -294,8 +294,13 @@ function verify_azure_session {
if [ "$session" == '' ]; then
display_login_instructions
error ${LINENO} "you must login to an Azure subscription first or 'rover login' again" 2
else
# If the session is a OIDC service principal we need to export the ARM variables
if [ "${ARM_USE_OIDC}" == "true" ]; then
export ARM_CLIENT_ID=$(echo $session | jq -r '.user.name')
export ARM_TENANT_ID=$(echo $session | jq -r '.tenantId')
fi
fi

}

function login_as_sp_from_keyvault_secrets {
Expand Down

0 comments on commit 6a2576d

Please sign in to comment.