antonbabenko / pre-commit-terraform

pre-commit git hooks to take care of Terraform configurations πŸ‡ΊπŸ‡¦
MIT License
3.24k stars 541 forks source link

terraform docs in conatiner outdated #724

Closed jwhitcraft closed 1 month ago

jwhitcraft commented 1 month ago

Describe the bug

When running terraform-docs locally we are using 0.19.0 which has this "fix"

But when running the the container it's only v0.18.0

image

How can we reproduce it?

Update a read-me locally that will contain new lines, they run the docker container over it and see notice it changes

MaxymVlasov commented 1 month ago

Pre-built docker images contained latest version of tools available during it buid time, and never change again. If you want to use latest builds - use nightly tag - https://github.com/antonbabenko/pre-commit-terraform/pkgs/container/pre-commit-terraform/291188741?tag=nightly

Or you can build your own image with needed versions, for this - checkout Docker section in https://github.com/antonbabenko/pre-commit-terraform?tab=readme-ov-file#1-install-dependencies

MaxymVlasov commented 1 month ago

Ah yes. To prevent accidental update to new version w/o your attention - use image digest image

diegolagospagopa commented 1 month ago

Ah yes. To prevent accidental update to new version w/o your attention - use image digest image

We use hashes, the problem is related to our workflow where you launch pre-commit locally that has terraform-docs v0.19.0 (and I can't change it) and the version that is currently inside the docker image v0.18.0.

As a result, I create a type of doc locally that is not consistent with the one generated by our CI.

For this reason I ask the kindness of generating a new image that upgrades terraform-docs to version 0.19.0

MaxymVlasov commented 1 month ago

Feel free to send PR which will introduce a GH workflow which will generate and tag, idk, <hook-version>_<tool>-<version>_<tool2>-<version>_<tool3>-<version>...? for last 10 hook versions?

MaxymVlasov commented 4 weeks ago

1.96.2 should contain terraform-docs 0.19.0

jwhitcraft commented 3 weeks ago

1.96.2 should contain terraform-docs 0.19.0

no container exist for 1.96.2: https://github.com/antonbabenko/pre-commit-terraform/pkgs/container/pre-commit-terraform

https://github.com/antonbabenko/pre-commit-terraform/actions/runs/11618633867

MaxymVlasov commented 3 weeks ago

@jwhitcraft thank you for notifying, fixed. https://github.com/antonbabenko/pre-commit-terraform/pkgs/container/pre-commit-terraform/300563841?tag=v1.96.2

diegolagospagopa commented 3 weeks ago

Perfect, it works πŸ˜„