samwise-CLI: The Open Source OpenTofu/Terraform module dependency tracker #2171
thundersparkf
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Modules can be published to registries like Terraform registry or GitLab. Modules can also be served from Git repositories by providing the HTTPS or SSH URLs. These can be versioned as well.
As your repositories grow and you reference your modules in other repositories, you would reasonably version your modules to ensure that upstream changes in the source doesn't break your infrastructure. However, it is difficult to keep track of all the new releases for the modules being used and even harder to do it regularly. Unaddressed, this builds overtime as tech debt as one day you discover that a core module is now 3 major versions ahead.
Solution
Presenting samwise-cli, a tool to help track your repository's Terraform/OpenTofu dependencies upstream. Searches your repository for usages of modules and generates a report of the modules that have updates available along with all the versions that are more advanced than the version used currently.
Tool:
Report sample:
Although there's already big projects like renovate that help track and manage dependencies, my goal in creating this was to have a really lightweight component that can fit easily in existing pipelines and work without leaving much of a trace.
Hope this is useful and please do share if there's any feedback or ideas. Currently I'm working on adding support to include module updates to the terraform/opentofu registries as well. Thanks!
Beta Was this translation helpful? Give feedback.
All reactions