diff --git a/.github/workflows/tfdrift.yml b/.github/workflows/tfdrift.yml index ec5a3073..38de04c6 100644 --- a/.github/workflows/tfdrift.yml +++ b/.github/workflows/tfdrift.yml @@ -26,7 +26,7 @@ on: terraform_version: type: string default: 1.3.6 - description: 'Required erraform version ' + description: 'Required erraform version' secrets: AZURE_CREDENTIALS: required: false @@ -43,6 +43,9 @@ on: build_role: required: false description: 'AWS OIDC role for aws authentication' + GCP_CREDENTIALS: + description: 'The Google Cloud JSON service account key to use for authentication' + required: false GITHUB: required: true description: 'PAT of the user to run the jobs.' @@ -88,6 +91,13 @@ jobs: role-duration-seconds: 900 role-skip-session-tagging: true + # Authenticate to GCP + - name: 'Authenticate to Google Cloud' + if: ${{ inputs.provider == 'gcp' }} + uses: 'google-github-actions/auth@v2' + with: + credentials_json: '${{ secrets.GCP_CREDENTIALS }}' + # Install azure-cli - name: Install Azure CLI if: ${{ inputs.provider == 'azurerm' }}