diff --git a/README.md b/README.md index 7750c39..5fcff2b 100644 --- a/README.md +++ b/README.md @@ -216,8 +216,8 @@ repos: - repo: https://github.com/tofuutils/pre-commit-opentofu rev: # Get the latest from: https://github.com/tofuutils/pre-commit-opentofu/releases hooks: - - id: terraform_fmt - - id: terraform_docs + - id: tofu_fmt + - id: tofu_docs EOF ``` @@ -252,7 +252,7 @@ There are several [pre-commit](https://pre-commit.com/) hooks to keep Terraform | Hook name | Description | Dependencies
[Install instructions here](#1-install-dependencies) | | ------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------ | -| `checkov` and `terraform_checkov` | [checkov](https://github.com/bridgecrewio/checkov) static analysis of terraform templates to spot potential security issues. [Hook notes](#checkov-deprecated-and-terraform_checkov) | `checkov`
Ubuntu deps: `python3`, `python3-pip` | +| `checkov` and `tofu_checkov` | [checkov](https://github.com/bridgecrewio/checkov) static analysis of OpenTofu templates to spot potential security issues. [Hook notes](#checkov-deprecated-and-tofu_checkov) | `checkov`
Ubuntu deps: `python3`, `python3-pip` | | `infracost_breakdown` | Check how much your infra costs with [infracost](https://github.com/infracost/infracost). [Hook notes](#infracost_breakdown) | `infracost`, `jq`, [Infracost API key](https://www.infracost.io/docs/#2-get-api-key) | | `terraform_docs` | Inserts input and output documentation into `README.md`. Recommended. [Hook notes](#terraform_docs) | `terraform-docs` | | `terraform_docs_replace` | Runs `terraform-docs` and pipes the output directly to README.md. **DEPRECATED**, see [#248](https://github.com/tofuutils/pre-commit-opentofu/issues/248). [Hook notes](#terraform_docs_replace-deprecated) | `python3`, `terraform-docs` | diff --git a/hooks/tofu_docs.sh b/hooks/tofu_docs.sh index 386929c..308b26f 100755 --- a/hooks/tofu_docs.sh +++ b/hooks/tofu_docs.sh @@ -47,7 +47,7 @@ function tofu_docs_ { IFS=";" read -r -a configs <<< "$hook_config" local hack_tofu_docs - hack_terraform_docs=$(terraform version | sed -n 1p | grep -c 0.12) || true + hack_terraform_docs=$(tofu version | sed -n 1p | grep -c 0.12) || true if [[ ! $(command -v terraform-docs) ]]; then echo "ERROR: terraform-docs is required by terraform_docs pre-commit hook but is not installed or in the system's PATH."