moonape1226 / pre-commit-terraform

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Collection of pre-commit hooks used for Terraform

Github tag

Install

Requirement

Please follow the instruction to install pre-commit first

Add configs and hooks

Under the repository you want to have the pre-commit hooks installed and run:

git init
cat <<EOF > .pre-commit-config.yaml
repos:
- repo: git://github.com/moonape1226/pre-commit-terraform
  rev: <VERSION> # Get the latest from: https://github.com/moonape1226/pre-commit-terraform/releases
  hooks:
    - id: managed_tag_check
EOF

Run

After pre-commit hook has been installed you can run it manually on all files in the repository

pre-commit run -a

Available Hooks

Hook name Description
managed_tag_check Check Terraform source has tag "Managed" = "Terraform".

Check the source file to know arguments used for each hook.

License

MIT licensed. See LICENSE for full details.

Acknowledgement

This repository is inspired by antonbabenko/pre-commit-terraform.

About

License:MIT License


Languages

Language:Shell 100.0%