Skip to content

Commit 28613d5

Browse files
committed
Code Update
1 parent e7a4f15 commit 28613d5

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

.github/workflows/terraform-multi.yaml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,17 @@ jobs:
169169
with:
170170
terraform_version: 1.6.6 # 👈 same version as init job
171171

172+
# 👇 ADD THIS: Export OIDC vars so Terraform can use them
173+
- name: Export Azure OIDC Environment Variables
174+
run: |
175+
echo "ARM_CLIENT_ID=${{ secrets.AZURE_CLIENT_ID }}" >> $GITHUB_ENV
176+
echo "ARM_TENANT_ID=${{ secrets.AZURE_TENANT_ID }}" >> $GITHUB_ENV
177+
echo "ARM_SUBSCRIPTION_ID=${{ secrets.AZURE_SUBSCRIPTION_ID }}" >> $GITHUB_ENV
178+
echo "ARM_USE_OIDC=true" >> $GITHUB_ENV
179+
180+
- name: Terraform Init (remote backend)
181+
run: terraform init -input=false -backend-config="resource_group_name=${{ inputs.rgname }}" -backend-config="storage_account_name=${{ inputs.saname }}" -backend-config="container_name=${{ inputs.scname }}" -backend-config="key=${{ inputs.key }}"
182+
172183
- name: Terraform validate
173184
run: terraform validate
174185

0 commit comments

Comments
 (0)