Skip to content

Access-log bucket (#95) #1

Access-log bucket (#95)

Access-log bucket (#95) #1

name: bucket-access-logs apply terraform
on:
push:
branches:
- main
paths:
- .github/workflows/bucket-access-logs-apply.yml
- terraform/services/bucket-access-logs/**
workflow_dispatch: # Allow manual trigger
jobs:
terraform-apply:
permissions:
contents: read
id-token: write
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./terraform/services/bucket-access-logs
strategy:
fail-fast: false
matrix:
app: [ab2d]
env: [mgmt, dev, test, sbx, prod]
include:
- app: bcda
env: mgmt
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