generated from cds-snc/project-template
-
Notifications
You must be signed in to change notification settings - Fork 0
78 lines (68 loc) · 2.55 KB
/
terragrunt-plan-production.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
name: "Terragrunt plan PRODUCTION"
on:
pull_request:
branches:
- main
paths:
- "terragrunt/aws/**"
- "terragrunt/env/production/**"
- "terragrunt/env/common/**"
- "terragrunt/env/terragrunt.hcl"
- ".github/workflows/terragrunt-plan-production.yml"
env:
AWS_REGION: ca-central-1
CONFTEST_VERSION: 0.27.0
TERRAFORM_VERSION: 1.9.8
TERRAGRUNT_VERSION: 0.68.6
TF_INPUT: false
TF_VAR_cloudwatch_alarm_slack_webhook: ${{ secrets.PRODUCTION_SLACK_WEBHOOK_OPS }}
permissions:
id-token: write
contents: read
pull-requests: write
jobs:
terragrunt-plan-production:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Setup terraform tools
uses: cds-snc/terraform-tools-setup@v1
- name: Configure AWS credentials using OIDC
uses: aws-actions/configure-aws-credentials@e3dd6a429d7300a6a4c196c26e071d42e0343502 # v4.0.2
with:
role-to-assume: arn:aws:iam::739275439843:role/data-lake-plan
role-session-name: TFPlan
aws-region: ${{ env.AWS_REGION }}
- name: Terragrunt plan buckets
uses: cds-snc/terraform-plan@25afd759b2ada46a94b011fab7a81963c4f3a61a # v3.3.0
with:
directory: "terragrunt/env/production/buckets"
comment-delete: "true"
comment-title: "Production: buckets 🪣"
github-token: "${{ secrets.GITHUB_TOKEN }}"
terragrunt: "true"
- name: Terragrunt plan glue
uses: cds-snc/terraform-plan@25afd759b2ada46a94b011fab7a81963c4f3a61a # v3.3.0
with:
directory: "terragrunt/env/production/glue"
comment-delete: "true"
comment-title: "Production: glue 🧴"
github-token: "${{ secrets.GITHUB_TOKEN }}"
terragrunt: "true"
- name: Terragrunt plan athena
uses: cds-snc/terraform-plan@25afd759b2ada46a94b011fab7a81963c4f3a61a # v3.3.0
with:
directory: "terragrunt/env/production/athena"
comment-delete: "true"
comment-title: "Production: athena 🔎"
github-token: "${{ secrets.GITHUB_TOKEN }}"
terragrunt: "true"
- name: Terragrunt plan alarms
uses: cds-snc/terraform-plan@25afd759b2ada46a94b011fab7a81963c4f3a61a # v3.3.0
with:
directory: "terragrunt/env/production/alarms"
comment-delete: "true"
comment-title: "Production: alarms 🚨"
github-token: "${{ secrets.GITHUB_TOKEN }}"
terragrunt: "true"