Skip to content

Commit

Permalink
Merge pull request #42 from padok-team/feat/terragrunt
Browse files Browse the repository at this point in the history
feat(terragrunt): checks
  • Loading branch information
Laudenlaruto authored Dec 2, 2024
2 parents 9f83288 + 763ebe5 commit 4862633
Showing 1 changed file with 66 additions and 0 deletions.
66 changes: 66 additions & 0 deletions .github/workflows/terragrunt-quality.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
on:
workflow_call:
inputs:
workdir:
required: false
type: string
default: .
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
defaults:
run:
working-directory: ${{ inputs.workdir }}
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 modules
run: terraform fmt -check -recursive -diff modules
- name: terragrunt fmt of directory layers
run: terragrunt hclfmt --terragrunt-check --terragrunt-diff layers
- name: guacamole code quality checks
id: guacamole
uses: padok-team/[email protected]
with:
path: ${{ inputs.workdir }}
verbose: true
terragrunt-security:
runs-on: ubuntu-latest
if: inputs.checkov_enabled
defaults:
run:
working-directory: ${{ inputs.workdir }}
steps:
- name: checkout
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4
- name: checkov of modules
uses: bridgecrewio/checkov-action@master
with:
directory: ${{ inputs.workdir }}/modules
framework: terraform
download_external_modules: false
quiet: true
skip_path: ${{ inputs.checkov_skip_path }}
baseline: ${{ inputs.checkov_baseline }}

0 comments on commit 4862633

Please sign in to comment.