It appears that the pre-commit tf_docs and gh-actions tf_docs are not compatible out-of-the-box.
When I generate docs using the command: terraform-docs markdown table --indent 2 --output-mode inject --output-file README.md ./ the GitHub actions (tfdocs) pass.
However, when the documentation is generated by the pre-commit hook, the CI fails with this error.
It appears that the pre-commit tf_docs and gh-actions tf_docs are not compatible out-of-the-box.
When I generate docs using the command: terraform-docs markdown table --indent 2 --output-mode inject --output-file README.md ./ the GitHub actions (tfdocs) pass.
However, when the documentation is generated by the pre-commit hook, the CI fails with this error.