From 9ea56770088fc05a137459becfb168683738a528 Mon Sep 17 00:00:00 2001 From: Lucas Mellos Carlos Date: Wed, 8 May 2024 15:09:18 -0300 Subject: [PATCH] add azure support --- .github/workflows/iac.yml | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/.github/workflows/iac.yml b/.github/workflows/iac.yml index e18d3f39..601485fd 100644 --- a/.github/workflows/iac.yml +++ b/.github/workflows/iac.yml @@ -57,6 +57,11 @@ on: required: true type: string default: ubuntu-latest + AZURE_ENV: + required: false + description: If Azure is required + type: boolean + default: false secrets: AWS_ACCESS_KEY_ID: required: true @@ -99,6 +104,15 @@ on: PRIVATE_SSH_KEY_TFMODULES: required: false description: A private SSH key to clone the repository + AZURE_CLIENT_ID: + required: false + description: "Azure Client ID" + AZURE_TENANT_ID: + required: false + description: "Azure Tenant ID" + AZURE_SUBSCRIPTION_ID: + required: false + description: "Azure Subscription ID" jobs: terragrunt: @@ -146,8 +160,17 @@ jobs: project_id: ${{ inputs.PROJECT_ID }} service_account: ${{ inputs.GCP_SA }} + - name: 'Authenticate Azure' + uses: azure/login@v1 + if: inputs.AZURE_ENV == true + with: + client-id: ${{ secrets.AZURE_CLIENT_ID }} + tenant-id: ${{ secrets.AZURE_TENANT_ID }} + subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }} + - name: Sops Binary Installer uses: mdgreenwald/mozilla-sops-action@v1.6.0 + if: inputs.TELEPORT_APP != '' with: version: 3.7.3