Skip to content

feat: refactor the lambda infrastructure #251

feat: refactor the lambda infrastructure

feat: refactor the lambda infrastructure #251

name: "CI Terraform"
on:
pull_request:
paths:
- "aws/**"
- "terragrunt/**"
- ".github/workflows/pull_requests_terraform.yml"
defaults:
run:
shell: bash
permissions:
id-token: write
pull-requests: write
contents: read
env:
AWS_REGION: ca-central-1
CONFTEST_VERSION: 0.27.0
TERRAFORM_VERSION: 0.13.5
TERRAGRUNT_VERSION: 0.26.0
TF_VAR_git_sha: abcdefgh
jobs:
terraform-plan:
if: github.ref != 'refs/heads/main'
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@ee0669bd1cc54295c223e0bb666b733df41de1c5 # v2.7.0
- name: Setup Terraform tools
uses: cds-snc/terraform-tools-setup@v1
- name: Configure AWS credentials using OIDC
uses: aws-actions/configure-aws-credentials@010d0da01d0b5a38af31e9c3470dbfdabdecca3a # v4.0.1
with:
role-to-assume: arn:aws:iam::637287734259:role/secret-plan
role-session-name: TFPlan
aws-region: ${{ env.AWS_REGION }}
- name: Plan aws/acm
uses: cds-snc/terraform-plan@b84f6e89f3e7b5ecf648a2c036c043c73d82da59 # v3.1.0
with:
comment-delete: true
comment-title: Plan for aws/acm
directory: ./terragrunt/acm
github-token: ${{ secrets.GITHUB_TOKEN }}
terragrunt: true
- name: Plan aws/ecr
uses: cds-snc/terraform-plan@b84f6e89f3e7b5ecf648a2c036c043c73d82da59 # v3.1.0
with:
comment-delete: true
comment-title: Plan for aws/ecr
directory: ./terragrunt/ecr
github-token: ${{ secrets.GITHUB_TOKEN }}
terragrunt: true
- name: Plan aws/lambda
uses: cds-snc/terraform-plan@b84f6e89f3e7b5ecf648a2c036c043c73d82da59 # v3.1.0
with:
comment-delete: true
comment-title: Plan for aws/lambda
directory: ./terragrunt/lambda
github-token: ${{ secrets.GITHUB_TOKEN }}
terragrunt: true