Skip to content

Commit

Permalink
Fix passing service principal password
Browse files Browse the repository at this point in the history
  • Loading branch information
lodrantl authored Dec 19, 2023
1 parent 38461b3 commit 107b74b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scripts/functions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ function verify_azure_session {
warning "ARM_CLIENT_ID, ARM_CLIENT_SECRET, ARM_SUBSCRIPTION_ID, ARM_TENANT_ID are set in the parent shell but the Azure cli is connected to a user instead of a service principal"
warning "Rover will therefore unset those environment variables to deploy with the current Azure cli context."
warning "logout and login with the service principal:"
warning 'az login --service-principal -u $ARM_CLIENT_ID -p $ARM_CLIENT_SECRET -t $ARM_TENANT_ID'
warning 'az login --service-principal -u $ARM_CLIENT_ID -p="$ARM_CLIENT_SECRET" -t $ARM_TENANT_ID'
warning
fi

Expand Down Expand Up @@ -328,7 +328,7 @@ function login_as_sp_from_keyvault_secrets {
export ARM_CLIENT_SECRET=$(az keyvault secret show --id ${sp_keyvault_url}/secrets/sp-client-secret --query 'value' -o tsv --only-show-errors)

information "Login with service principal"
az login --service-principal -u ${ARM_CLIENT_ID} -p ${ARM_CLIENT_SECRET} -t ${ARM_TENANT_ID} --only-show-errors 1> /dev/null
az login --service-principal -u ${ARM_CLIENT_ID} -p="${ARM_CLIENT_SECRET}" -t ${ARM_TENANT_ID} --only-show-errors 1> /dev/null

set +e
trap - ERR
Expand Down

0 comments on commit 107b74b

Please sign in to comment.