Skip to content

Commit

Permalink
feat(terragrunt): checks
Browse files Browse the repository at this point in the history
  • Loading branch information
Laudenlaruto committed Nov 27, 2024
1 parent 9f83288 commit f7805a5
Showing 1 changed file with 62 additions and 0 deletions.
62 changes: 62 additions & 0 deletions .github/workflows/terragrunt-quality.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
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 }}
steps:
- name: checkout
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4
- uses: tofuutils/tenv-github-action@3e0c27a3e1131f756e3973e064ffcca2c139e010
with:
tool_name: terraform
- uses: tofuutils/tenv-github-action@3e0c27a3e1131f756e3973e064ffcca2c139e010
with:
tool_name: terragrunt
- 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: modules
framework: terraform
download_external_modules: false
quiet: true
skip_path: ${{ inputs.checkov_skip_path }}
baseline: ${{ inputs.checkov_baseline }}

0 comments on commit f7805a5

Please sign in to comment.