Skip to content

Commit

Permalink
feat: 🚀 Added GCP authentication steps in tfdrift (#120)
Browse files Browse the repository at this point in the history
  • Loading branch information
Tanveer143s authored Jan 26, 2024
1 parent 4f36a5f commit 41d870f
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion .github/workflows/tfdrift.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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.'
Expand Down Expand Up @@ -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' }}
Expand Down

0 comments on commit 41d870f

Please sign in to comment.