Skip to content

Add OIDC provider and pipelines #84

Add OIDC provider and pipelines

Add OIDC provider and pipelines #84

name: terraform plan (management-account)
on:
pull_request:
paths:
- 'management-account/terraform/**'
- 'modules/**'
- '.github/workflows/management-account-plan.yml'
- '.github/workflows/management-account-apply.yml'
workflow_dispatch:
jobs:
plan:
runs-on: ubuntu-latest
permissions:
id-token: write
contents: read
defaults:
run:
working-directory: ./management-account/terraform
steps:
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
- uses: aws-actions/configure-aws-credentials@5fd3084fc36e372ff1fff382a39b10d03659f355 # v2.2.0
with:
role-to-assume: arn:aws:iam::${{secrets.AWS_ROOT_ACCOUNT_ID}}:role/github-actions-plan
role-session-name: GitHubActions
aws-region: eu-west-2
- uses: hashicorp/setup-terraform@633666f66e0061ca3b725c73b2ec20cd13a8fdd1 # v2.0.3
with:
terraform_version: 1.5.2
- run: terraform fmt -check
continue-on-error: true
- run: terraform init
- run: terraform validate -no-color
- run: terraform plan -no-color