-
Notifications
You must be signed in to change notification settings - Fork 0
64 lines (63 loc) · 2.11 KB
/
terragrunt-quality.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
on:
workflow_call:
inputs:
workdir:
required: false
type: string
default: .
modules_path:
required: false
type: string
default: modules
checkov_enabled:
required: false
type: boolean
default: true
checkov_skip_path:
required: false
type: string
checkov_baseline:
required: false
type: string
name: terragrunt-quality
jobs:
terragrunt-lint:
runs-on: ubuntu-latest
env:
GITHUB_ACTIONS: true
steps:
- name: checkout
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4
- name: Setup TF and TG (via tenv)
run: |
VERSION=$(curl --silent https://api.github.com/repos/tofuutils/tenv/releases/latest | jq -r .tag_name)
curl -O -L "https://github.com/tofuutils/tenv/releases/latest/download/tenv_${VERSION}_amd64.deb"
sudo dpkg -i "tenv_${VERSION}_amd64.deb"
tenv terraform install latest
tenv terragrunt install latest
tenv update-path
- name: terraform fmt of directory ${{ inputs.modules_path }}
run: terraform fmt -check -recursive -diff ${{ inputs.modules_path }}
- name: terragrunt fmt of directory ${{ inputs.workdir }}
run: terragrunt hclfmt --check --diff ${{ inputs.workdir }}
- name: guacamole code quality checks
id: guacamole
uses: padok-team/guacamole-action@1cd4678ecf3f391ec25980769f1565ddd5cc6a4c # v1.3.1
with:
path: ${{ inputs.workdir }}
verbose: true
terragrunt-security:
runs-on: ubuntu-latest
if: inputs.checkov_enabled
steps:
- name: checkout
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4
- name: checkov of ${{ inputs.modules_path }}
uses: bridgecrewio/checkov-action@master
with:
directory: ${{ inputs.modules_path }}
framework: terraform
download_external_modules: false
quiet: true
skip_path: ${{ inputs.checkov_skip_path }}
baseline: ${{ inputs.checkov_baseline }}