This repository has been archived by the owner on Nov 16, 2021. It is now read-only.
generated from cds-snc/.github
-
Notifications
You must be signed in to change notification settings - Fork 1
61 lines (56 loc) · 1.84 KB
/
tf_plan.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
name: Terraform plan
on:
workflow_dispatch:
pull_request:
paths:
- "aws/**"
- "terragrunt/**"
- ".github/workflows/**"
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_REGION: ca-central-1
GITHUB_SHA: ${{ github.sha }}
LOGGING_ACCOUNT: ${{ secrets.LOGGING_ACCOUNT }}
SECURITY_ACCOUNT: ${{ secrets.SECURITY_ACCOUNT }}
TERRAFORM_VERSION: 0.14.2
TERRAGRUNT_VERSION: v0.29.2
TF_VAR_kibana_admin_role: ${{ secrets.KIBANA_ADMIN_ROLE }}
TF_VAR_landing_zone_prefix: ${{ secrets.LANDING_ZONE_PREFIX}}
TF_VAR_maxmind_key: ${{ secrets.MAXMIND_KEY}}
jobs:
terraform-plan:
strategy:
fail-fast: false
matrix:
include:
- module: cloud-trail
- module: guard-duty
- module: security-hub
- module: siem/elasticsearch
- module: siem/elasticsearch_loader
- module: siem/ip-geolocation
- module: siem/s3-replication
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup Terraform
uses: hashicorp/[email protected]
with:
terraform_version: ${{ env.TERRAFORM_VERSION }}
terraform_wrapper: false
- name: Setup Terragrunt
run: |
mkdir bin
wget -O bin/terragrunt https://github.com/gruntwork-io/terragrunt/releases/download/$TERRAGRUNT_VERSION/terragrunt_linux_amd64
chmod +x bin/*
echo "$GITHUB_WORKSPACE/bin" >> $GITHUB_PATH
- name: Terraform plan
uses: cds-snc/terraform-plan@v1
with:
comment-delete: true
comment-title: Plan for ${{ matrix.module }}
directory: ./terragrunt/${{ matrix.module }}
github-token: ${{ secrets.GITHUB_TOKEN }}
terragrunt: true