generated from cds-snc/project-template
-
Notifications
You must be signed in to change notification settings - Fork 0
89 lines (78 loc) · 3.02 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
79
80
81
82
83
84
85
86
87
88
89
name: "Terragrunt plan PRODUCTION"
on:
pull_request:
branches:
- main
paths:
- "terragrunt/aws/**"
- "!terragrunt/aws/glue/etl/**/*.json"
- "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.10.3
TERRAGRUNT_VERSION: 0.68.6
TF_INPUT: false
TF_VAR_cloudwatch_alarm_slack_webhook: ${{ secrets.PRODUCTION_SLACK_WEBHOOK_OPS }}
TF_VAR_freshdesk_api_key: ${{ secrets.PRODUCTION_FRESHDESK_API_KEY }}
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@d79bcf0eccf632a0ad9e9193072b42c970766c5b # v3.3.1
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@d79bcf0eccf632a0ad9e9193072b42c970766c5b # v3.3.1
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@d79bcf0eccf632a0ad9e9193072b42c970766c5b # v3.3.1
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@d79bcf0eccf632a0ad9e9193072b42c970766c5b # v3.3.1
with:
directory: "terragrunt/env/production/alarms"
comment-delete: "true"
comment-title: "Production: alarms 🚨"
github-token: "${{ secrets.GITHUB_TOKEN }}"
terragrunt: "true"
- name: Terragrunt plan export
uses: cds-snc/terraform-plan@d79bcf0eccf632a0ad9e9193072b42c970766c5b # v3.3.1
with:
directory: "terragrunt/env/production/export"
comment-delete: "true"
comment-title: "Production: export 💾"
github-token: "${{ secrets.GITHUB_TOKEN }}"
terragrunt: "true"