A CLI tool to update version constraints in Terraform and OpenTofu configurations and lock files, supporting bulk updates and CI automation.
tfupdate is a CLI tool that automatically updates version constraints in Terraform and OpenTofu configuration files and dependency lock files. It solves the problem of manually tracking and updating scattered version pins across multiple infrastructure codebases, reducing the risk of upgrade failures and security vulnerabilities.
DevOps engineers, platform engineers, and infrastructure developers who manage multiple Terraform/OpenTofu projects and need to keep dependencies consistently updated.
Developers choose tfupdate because it provides a single, automated solution for bulk version updates across fragmented configurations, integrates seamlessly with CI/CD pipelines, and works without requiring the Terraform CLI for lock file operations.
Update version constraints in your Terraform / OpenTofu configurations
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Updates version constraints recursively across multiple directories, saving time in scattered Terraform/OpenTofu projects as highlighted in the README's recursive option examples.
Updates .terraform.lock.hcl files without requiring Terraform/OpenTofu CLI, improving performance for bulk operations by caching hash values in memory.
Fetches latest release versions from multiple registries (GitHub, GitLab, Terraform/OpenTofu Registry), automating version discovery with commands like 'tfupdate release latest'.
Designed for CI pipelines with examples like CircleCI integration, enabling automated pull request creation for dependency updates.
Accepts both specific version numbers and constraint expressions (e.g., '~> 1.0'), providing flexibility in updating as shown in the provider and module update examples.
Does not support automatic latest version resolution for modules, requiring manual version specification for module updates, as admitted in the README.
Assumes all dependencies are pinned in the root module and ignores version constraint expressions or indirect dependencies when updating lock files, limiting support for complex dependency graphs.
Requires setting environment variables (e.g., GITHUB_TOKEN, TFREGISTRY_BASE_URL) for accessing private repositories or custom registries, adding setup complexity.