Skip to content

Setup workload identity federation, using github as provider #7

Setup workload identity federation, using github as provider

Setup workload identity federation, using github as provider #7

Workflow file for this run

name: CI & Plan
on:
pull_request:
jobs:
build:
# The permissions are necessary for the google-github-actions/auth@v2 action
permissions:
contents: read
id-token: write
runs-on: [ubuntu-latest]
steps:
- uses: actions/checkout@v4
- uses: hashicorp/setup-terraform@v3
- uses: google-github-actions/auth@v2
with:
project_id: ${{ secrets.GCP_PROJECT_ID }}
workload_identity_provider: ${{ secrets.STATE_BUCKET_ACCESS_WIF_PROVIDER }}
- name: Set up Cloud SDK
uses: google-github-actions/setup-gcloud@v2
with:
version: '>= 363.0.0'
- name: Use gcloud CLI
run: gcloud info
- id: init
run: terraform init
- id: plan
run: terraform plan -no-color
- run: echo ${{ steps.plan.outputs.stdout }}
- run: echo ${{ steps.plan.outputs.stderr }}
- run: echo ${{ steps.plan.outputs.exitcode }}