Skip to content

BCDA-8626: Add supporting terraform for new BCDA lambda #3

BCDA-8626: Add supporting terraform for new BCDA lambda

BCDA-8626: Add supporting terraform for new BCDA lambda #3

name: Admin ACO Deny plan terraform
on:
pull_request:
paths:
- .github/workflows/admin-aco-deny-plan.yml
- terraform/modules/bucket/**
- terraform/modules/key/**
- terraform/modules/function/**
- terraform/modules/queue/**
- terraform/modules/subnets/**
- terraform/modules/vpc/**
- terraform/services/admin-aco-deny/**
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/admin-aco-deny
terraform-plan:
needs: check-terraform-fmt
permissions:
contents: read
id-token: write
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./terraform/services/admin-aco-deny
strategy:
fail-fast: false
matrix:
env: [dev]
env:
TF_VAR_env: ${{ matrix.env }}
TF_VAR_app: bcda
steps:
- uses: actions/checkout@v4
- uses: ./actions/setup-tfenv-terraform
- uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: arn:aws:iam::${{ secrets.BCDA_ACCOUNT }}:role/delegatedadmin/developer/bcda-${{ matrix.env }}-github-actions
aws-region: ${{ vars.AWS_REGION }}
- run: terraform init -reconfigure -backend-config=../../backends/bcda-$TF_VAR_env.s3.tfbackend
- run: terraform plan