Skip to content

Commit

Permalink
Move AZ AD Environment Variables to check_dependencies (#4131)
Browse files Browse the repository at this point in the history
set azure ad environment variables in check_dependencies rather than in load_and_validate_env
  • Loading branch information
yuvalyaron authored Nov 11, 2024
1 parent 07173fe commit 35cd559
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 8 deletions.
3 changes: 0 additions & 3 deletions .github/actions/devcontainer_run_command/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -186,9 +186,6 @@ runs:
-e TF_INPUT="0" \
-e TF_IN_AUTOMATION="1" \
-e USE_ENV_VARS_NOT_FILES="true" \
-e ARM_STORAGE_USE_AZUREAD="true" \
-e ARM_USE_AZUREAD="true" \
-e ARM_USE_OIDC="true" \
-e BUNDLE_TYPE="${{ inputs.BUNDLE_TYPE }}" \
-e WORKSPACE_SERVICE_NAME="${{ inputs.WORKSPACE_SERVICE_NAME }}" \
-e ARM_ENVIRONMENT="${{ env.ARM_ENVIRONMENT }}" \
Expand Down
5 changes: 5 additions & 0 deletions devops/scripts/check_dependencies.sh
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,11 @@ export SUB_ID
TENANT_ID=$(az account show --query tenantId -o tsv)
export TENANT_ID

# Configure AzureRM provider and backend to use Azure AD to connect to storage accounts
export ARM_STORAGE_USE_AZUREAD=true
export ARM_USE_AZUREAD=true
export ARM_USE_OIDC=true

if [ -z "$SUB_NAME" ]; then
echo -e "\n\e[31m»»» ⚠️ You are not logged in to Azure!"
exit 1
Expand Down
5 changes: 0 additions & 5 deletions devops/scripts/load_and_validate_env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -83,11 +83,6 @@ else

TRE_URL=$(construct_tre_url "${TRE_ID}" "${LOCATION}" "${AZURE_ENVIRONMENT}")
export TRE_URL

# Configure AzureRM provider and backend to use Azure AD to connect to storage accounts
export ARM_STORAGE_USE_AZUREAD=true
export ARM_USE_AZUREAD=true
export ARM_USE_OIDC=true
fi

# if local debugging is configured, then set vars required by ~/.porter/config.yaml
Expand Down

0 comments on commit 35cd559

Please sign in to comment.