Skip to content

Commit

Permalink
feat(terragrunt): checks
Browse files Browse the repository at this point in the history
  • Loading branch information
Laudenlaruto committed Dec 2, 2024
1 parent 9f83288 commit 6317c83
Showing 1 changed file with 73 additions and 0 deletions.
73 changes: 73 additions & 0 deletions .github/workflows/terragrunt-quality.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
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
name: Install Terraform
with:
tool_name: terraform
- name: terraform fmt of directory modules
run: terraform fmt -check -recursive -diff modules
- uses: tofuutils/tenv-github-action@3e0c27a3e1131f756e3973e064ffcca2c139e010
name: Install Terragrunt
with:
tool_name: terragrunt
- name: wtf
run: |
ls -lah ~
echo ---
ls -lah $GITHUB_WORKSPACE
echo ---
ls -lah $GITHUB_WORKSPACE/.tenv/Terragrunt/
echo ---
ls -lah /usr/local/bin/
- name: terragrunt fmt of directory layers
run: /usr/local/bin/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 6317c83

Please sign in to comment.