| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
Python base simple terraform pre-commit hook.
Requires python version 3.9 or above.
Add the following repo to your .pre-commit-config.yaml
...
- repo: https://github.com/devopsforhumans/tf-pre-commit
rev: v1.0.4
hooks:
- id: terraform-fmt
...if you want to provide options or global options (try terraform fmt --help) then use args
...
- repo: https://github.com/devopsforhumans/tf-pre-commit.git
rev: v1.0.4
hooks:
- id: terraform-fmt
args:
- --options="-no-color -diff -check"
...Note If -recursive is provided in the --options argument, terraform formatting will recursively format the parent directory of the file in context.
Create virtual environment
python3 -m venv .venvActivate virtual environment
source .venv/bin/activateor for windows
.\.venv\Scripts\activate.ps1Install dependencies
To install dependencies with pipenv use the following command
python3 -m pip install -r requirements.txtTo install dev dependencies use --dev flag
python3 -m pip install -r requirements_dev.txttf-pre-commit is distributed under the terms of the BSD-3-Clause license.
| Back | FazBrowse Home | New Git URL |