Skip to content

PLT-674: DRAFT POC for DPC Quicksight - NOT READY FOR MERGE #76

PLT-674: DRAFT POC for DPC Quicksight - NOT READY FOR MERGE

PLT-674: DRAFT POC for DPC Quicksight - NOT READY FOR MERGE #76

name: dpc-quicksights plan terraform
on:
pull_request:
paths:
- .github/workflows/dpc-quicksights-plan.yml
- terraform/services/dpc-quicksights/**
# - terraform/modules/athena/**
# - terraform/modules/glue/**
# - terraform/modules/firehose/**
# - terraform/modules/quicksight/**
workflow_dispatch: # Allow manual trigger
jobs:
check-terraform-fmt:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./actions/setup-tfenv-terraform
- run: terraform fmt -check -diff -recursive terraform/services/dpc-quicksights
terraform-plan:
needs: check-terraform-fmt
permissions:
contents: read
id-token: write
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./terraform/services/dpc-quicksights
strategy:
fail-fast: false
matrix:
# app: [ab2d, bcda, dpc]
# env: [dev, test, sbx, prod]
app: [dpc]
env: [dev]
steps:
- uses: actions/checkout@v4
- uses: ./actions/setup-tfenv-terraform
- uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: arn:aws:iam::${{ matrix.app == 'ab2d' && secrets[format('{0}_{1}_ACCOUNT', matrix.app, matrix.env)] || secrets.BCDA_ACCOUNT }}:role/delegatedadmin/developer/${{ matrix.app }}-${{ matrix.env }}-github-actions
aws-region: ${{ vars.AWS_REGION }}
- run: terraform init -backend-config=../../backends/${{ matrix.app }}-${{ matrix.env }}.s3.tfbackend
- run: terraform plan
env:
TF_VAR_app: ${{ matrix.app }}
TF_VAR_env: ${{ matrix.env }}
## temporary until dpc-quicksights-apply is merged
terraform-apply:
needs: terraform-plan
permissions:
contents: read
id-token: write
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./terraform/services/dpc-quicksights
strategy:
fail-fast: false
matrix:
# app: [ab2d, bcda, dpc]
# env: [dev, test, sbx, prod]
app: [dpc]
env: [dev]
steps:
- uses: actions/checkout@v4
- uses: ./actions/setup-tfenv-terraform
- uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: arn:aws:iam::${{ matrix.app == 'ab2d' && secrets[format('{0}_{1}_ACCOUNT', matrix.app, matrix.env)] || secrets.BCDA_ACCOUNT }}:role/delegatedadmin/developer/${{ matrix.app }}-${{ matrix.env }}-github-actions
aws-region: ${{ vars.AWS_REGION }}
- run: terraform init -backend-config=../../backends/${{ matrix.app }}-${{ matrix.env }}.s3.tfbackend
- run: terraform apply -auto-approve
env:
TF_VAR_app: ${{ matrix.app }}
TF_VAR_env: ${{ matrix.env }}