I'm managing two EKS clusters—one for staging and the other for production—using Terraform alongside a co-worker. Recently, we decided to upgrade our staging cluster because Amazon Linux v2 support is being phased out. I updated the Terraform code and ran `terraform init -upgrade`, but that led to several issues during the `plan` stage. After some debugging and resetting back to the prior version, we discovered that while I had upgraded the AWS provider, the upgrade also changed the versions for several other modules since they weren't properly versioned. This resulted in us using different versions of the same modules, which is obviously problematic. How do you manage your provider and module versions to ensure consistency? Additionally, are there any tools similar to `composer` for PHP or `go mod` for Golang that can help with version management in Kubernetes?
6 Answers
Just a heads up, this issue is more about Terraform than Kubernetes specifically. You might want to ask over in a Terraform-focused community for more tailored advice!
I've heard great things about automation tools like Renovate CI and Updatecli for handling version updates automatically. They can check for version changes and create pull requests for you, plus they run basic CI tests to ensure that everything works smoothly before merging. This takes away the manual effort of version checking each week.
I usually avoid external modules to keep things simpler, but if you go that route, Renovate can still help manage updates for you. You can set hardcoded versions and let it track changes for approval and merging. If you want to use variables, check out Opentofu—it's worth looking into.
You might find Terragrunt useful. It's designed to help manage Terraform, especially with keeping module versions consistent across environments. Definitely worth considering!
We tackle the versioning issue by pinning module versions for different environments and maintaining a module lock file to keep everyone aligned. Plus, we use tools like Renovate to automate PRs for version updates. This way, we can manage upgrades more smoothly without drift causing unexpected costs or issues.
If you're looking for something specific, you could try Updatecli. It's super useful for automating version updates across various file types, including Terraform modules. You can check it out at their official site.

Related Questions
How To: Running Codex CLI on Windows with Azure OpenAI
Set Wordpress Featured Image Using Javascript
How To Fix PHP Random Being The Same
Why no WebP Support with Wordpress
Replace Wordpress Cron With Linux Cron
Customize Yoast Canonical URL Programmatically