Skip to content

✨ Add Slack Notification on Terraform Apply Failure #101

✨ Add Slack Notification on Terraform Apply Failure

✨ Add Slack Notification on Terraform Apply Failure #101

name: terraform plan (organisation-security)
on:
pull_request:
paths:
- 'organisation-security/terraform/**'
- 'modules/**'
- '.github/workflows/organisation-security-plan.yml'
- '.github/workflows/organisation-security-apply.yml'
workflow_dispatch:
jobs:
plan:
runs-on: ubuntu-latest
permissions:
id-token: write
contents: read
defaults:
run:
working-directory: ./organisation-security/terraform
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- uses: aws-actions/configure-aws-credentials@e3dd6a429d7300a6a4c196c26e071d42e0343502 # v4.0.2
with:
role-to-assume: arn:aws:iam::${{secrets.AWS_SECURITY_ACCOUNT_ID}}:role/github-actions-plan
role-session-name: GitHubActions
aws-region: eu-west-2
- uses: hashicorp/setup-terraform@651471c36a6092792c552e8b1bef71e592b462d8 # v3.1.1
with:
terraform_version: 1.7.5
- run: terraform fmt -check
continue-on-error: true
- run: terraform init
- run: terraform validate -no-color
- run: terraform plan -no-color