This repository has been archived on 2026-11-21. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
terraform-vault/.pre-commit-config.yaml
T
unkin-agent 5245bcdc29
ci/woodpecker/push/apply Pipeline was successful
Omit empty tune block on remaining auth backends (#178)
terraform-provider-vault 5.6.0 panics in expandAuthMethodTune when an auth backend gets a tune block whose values are all null. #176 fixed the JWT backend; the approle, kubernetes, ldap and oidc backends still render tune unconditionally, so any mount of theirs without tune values crashes plan.

- Render tune via a dynamic block only when at least one tune value is set; values pass through unchanged
- Add tofu tests per module covering the unset and set cases
- Run the new module tests from make test and the tofu-module-tests hook

Reviewed-on: #178
Co-authored-by: unkin-agent <unkin-agent@unkin.net>
Co-committed-by: unkin-agent <unkin-agent@unkin.net>
2026-11-14 19:02:09 +11:00

40 lines
1.3 KiB
YAML

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
- id: end-of-file-fixer
types: [yaml]
- id: trailing-whitespace
types: [yaml]
- repo: https://github.com/gruntwork-io/pre-commit
rev: v0.1.30
hooks:
- id: tofu-fmt
- id: tofu-validate
- id: tflint
- id: terragrunt-hcl-fmt
- repo: https://github.com/adrienverge/yamllint.git
rev: v1.37.1
hooks:
- id: yamllint
args:
[
"-d {extends: relaxed, rules: {line-length: disable}, ignore: chart}",
"-s",
]
- repo: local
hooks:
- id: vault-yaml-tests
name: vault yaml definitions pass their unit tests
entry: python3 -m unittest discover -s tests -t .
language: python
additional_dependencies: [pyyaml, pydantic]
pass_filenames: false
always_run: true
- id: tofu-module-tests
name: tofu module tests pass
entry: sh -c 'for m in auth_approle_backend auth_jwt_backend auth_jwt_role auth_kubernetes_backend auth_ldap_backend auth_oidc_backend; do (cd modules/vault_cluster/modules/$m && tofu init -backend=false -input=false >/dev/null && tofu test) || exit 1; done'
language: system
pass_filenames: false
always_run: true