V2 - initial pass #3
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Terraform plan (OIDC) | |
on: | |
pull_request: | |
branches: | |
- main # or any other branch you want to trigger the deployment | |
paths: | |
- '**/*.tf' | |
permissions: | |
id-token: write | |
contents: read | |
jobs: | |
terraform-plan: | |
name: Terraform Plan | |
runs-on: ubuntu-latest | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
permissions: | |
id-token: write | |
contents: read | |
pull-requests: write | |
steps: | |
- name: Clone repo | |
uses: actions/checkout@v4 | |
- name: configure aws credentials | |
uses: aws-actions/configure-aws-credentials@v3 | |
with: | |
role-to-assume: arn:aws:iam::035866691871:role/gha-incubator | |
role-session-name: ghaincubatorsession | |
aws-region: us-west-2 | |
- name: Terraform Plan | |
uses: dflook/terraform-plan@v1 | |
with: | |
path: terraform | |
backend_config_file: terraform/prod.backend.tfvars | |