Skip to content

Commit 315ecd5

Browse files
tamirkamaraCopilot
andcommitted
Apply suggestions from code review
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent a96d83d commit 315ecd5

3 files changed

Lines changed: 14 additions & 3 deletions

File tree

.github/workflows/deploy_tre_reusable.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,15 @@ jobs:
185185
if [ "${{ secrets.TRE_ID }}" == '' ]; then
186186
echo "Missing secret: TRE_ID" && exit 1
187187
fi
188+
if [ "${{ secrets.AZURE_CLIENT_ID }}" == '' ]; then
189+
echo "Missing secret: AZURE_CLIENT_ID" && exit 1
190+
fi
191+
if [ "${{ secrets.AZURE_TENANT_ID }}" == '' ]; then
192+
echo "Missing secret: AZURE_TENANT_ID" && exit 1
193+
fi
194+
if [ "${{ secrets.AZURE_SUBSCRIPTION_ID }}" == '' ]; then
195+
echo "Missing secret: AZURE_SUBSCRIPTION_ID" && exit 1
196+
fi
188197
189198
if [ "${{ inputs.DEVCONTAINER_TAG }}" == '' ]; then
190199
echo "Missing input: DEVCONTAINER_TAG" && exit 1

.github/workflows/lets_encrypt.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ jobs:
6666
ARM_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }}
6767
ARM_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }}
6868
ARM_SUBSCRIPTION_ID: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
69-
AZURE_ENVIRONMENT: ${{ vars.AZURE_ENVIRONMENT }}
69+
AZURE_ENVIRONMENT: ${{ (vars.AZURE_ENVIRONMENT != '' && vars.AZURE_ENVIRONMENT) || 'AzureCloud' }}
7070
TRE_ID: ${{ secrets.TRE_ID }}
7171
TF_VAR_terraform_state_container_name: ${{ secrets.TERRAFORM_STATE_CONTAINER_NAME || 'tfstate' }}
7272
TF_VAR_mgmt_resource_group_name: ${{ secrets.MGMT_RESOURCE_GROUP_NAME }}

devops/scripts/bootstrap_azure_env.sh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,10 @@ set_account_context() {
6767

6868
export ARM_STORAGE_USE_AZUREAD=true
6969
export ARM_USE_AZUREAD=true
70-
# We have to use AZCLI auth in Terraform because with Github Actions
71-
# federated-id won't work in the devcontainer passed 5 mins.
70+
# Force Terraform to use Azure CLI authentication. GitHub Actions OIDC
71+
# (federated) tokens are short-lived and are not reliably available inside
72+
# the devcontainer after their initial lifetime, which can cause Terraform
73+
# authentication to fail. Using ARM_USE_CLI=true avoids this issue.
7274
export ARM_USE_CLI=true
7375

7476
echo -e "\e[34m»»» 🔨 \e[96mAzure details from logged on user \e[0m"

0 commit comments

Comments
 (0)