Skip to content

Commit

Permalink
Merge pull request #385 from cagov/tr_update_pre_commit_checks_217
Browse files Browse the repository at this point in the history
Tr update pre commit checks 217
  • Loading branch information
britt-allen authored Sep 3, 2024
2 parents afd01a9 + 740b87c commit fc98c6c
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 17 deletions.
8 changes: 0 additions & 8 deletions .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,6 @@ jobs:
# just use $SNOWFLAKE_PRIVATE_KEY
- name: Set up private key
run: echo "$PRIVATE_KEY" > $SNOWFLAKE_PRIVATE_KEY_PATH
- name: Setup terraform
uses: hashicorp/setup-terraform@v2
with:
terraform_version: v1.4.0
- name: Install tflint
run: |
curl -s https://raw.githubusercontent.com/terraform-linters/\
tflint/master/install_linux.sh | bash
- uses: actions/setup-python@v4
with:
python-version: "3.10"
Expand Down
32 changes: 32 additions & 0 deletions .github/workflows/terraform-checks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: terraform-checks

on:
pull_request:
push:
branches: [main]

##env:
## TFLINT_LOG: debug

jobs:
terraform-checks:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup terraform
uses: hashicorp/setup-terraform@v2
with:
terraform_version: v1.4.0
- name: Install tflint
run: |
curl -s https://raw.githubusercontent.com/terraform-linters/\
tflint/master/install_linux.sh | bash
- name: Run terraform fmt
run: |
terraform fmt
- name: Run terraform validate
run: |
terraform validate
- name: Run terraform tflint
run: |
tflint --chdir=terraform/ --recursive
9 changes: 0 additions & 9 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,6 @@ repos:
hooks:
- id: yamllint
args: []
- repo: https://github.com/antonbabenko/pre-commit-terraform
rev: v1.77.1
hooks:
- id: terraform_fmt
- id: terraform_validate
# Exclude modules to work around
# https://github.com/hashicorp/terraform/issues/28490
exclude: "terraform/modules/[^/]+/[^/]+$"
- id: terraform_tflint
- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: v0.1.6
hooks:
Expand Down

0 comments on commit fc98c6c

Please sign in to comment.