Skip to content

Commit

Permalink
Fix OIDC timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
jaredfholgate committed Dec 21, 2023
1 parent 75d44f9 commit 9f81620
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,10 @@ jobs:
export ARM_CLIENT_ID=${{ secrets.AZURE_CLIENT_ID }}
export ARM_SUBSCRIPTION_ID=${{ secrets.AZURE_SUBSCRIPTION_ID }}
export ARM_TENANT_ID=${{ secrets.AZURE_TENANT_ID }}
export ARM_OIDC_REQUEST_TOKEN=$ACTIONS_ID_TOKEN_REQUEST_TOKEN
export ARM_OIDC_REQUEST_URL=$ACTIONS_ID_TOKEN_REQUEST_URL
# Get an OIDC id token from GitHub
ID_TOKEN=$(curl -H "Authorization: bearer $ACTIONS_ID_TOKEN_REQUEST_TOKEN" "$ACTIONS_ID_TOKEN_REQUEST_URL&audience=api://AzureADTokenExchange" | jq -r ".value")
echo "$ID_TOKEN"
export ARM_OIDC_TOKEN=$ID_TOKEN
docker run --rm -v /var/run/docker.sock:/var/run/docker.sock -v $(pwd):/src -w /src --network=host -e TF_IN_AUTOMATION -e TF_VAR_enable_telemetry -e AVM_MOD_PATH=/src -e AVM_EXAMPLE=${{ matrix.example }} -e ARM_CLIENT_ID -e ARM_SUBSCRIPTION_ID -e ARM_TENANT_ID -e ARM_OIDC_TOKEN -e ARM_USE_OIDC=true mcr.microsoft.com/azterraform:latest make test-example
docker run --rm -v /var/run/docker.sock:/var/run/docker.sock -v $(pwd):/src -w /src --network=host -e TF_IN_AUTOMATION -e TF_VAR_enable_telemetry -e AVM_MOD_PATH=/src -e AVM_EXAMPLE=${{ matrix.example }} -e ARM_CLIENT_ID -e ARM_SUBSCRIPTION_ID -e ARM_TENANT_ID -e ARM_OIDC_REQUEST_TOKEN -e ARM_OIDC_REQUEST_URL -e ARM_USE_OIDC=true mcr.microsoft.com/azterraform:latest make test-example
# This job is only run when all the previous jobs are successful.
# We can use it for PR validation to ensure all examples have completed.
Expand Down

0 comments on commit 9f81620

Please sign in to comment.