macOS
brew install tfmigratelocal Homebrew formula metadata
sudo port install tfmigrateMacPorts ports tree · sysutils/tfmigrate/Portfile · source: api.github.com
brew
Terraform/OpenTofu state migration tool for GitOps. Version 0.4.5 via Homebrew; verified 2026-05-15.
install
brew install tfmigratelocal Homebrew formula metadata
sudo port install tfmigrateMacPorts ports tree · sysutils/tfmigrate/Portfile · source: api.github.com
nix profile install nixpkgs#tfmigratenixpkgs package indexes · pkgs/by-name/tf/tfmigrate/package.nix · source: api.github.com
overview
Terraform/OpenTofu state migration tool for GitOps
history
tfmigrate is a Terraform and OpenTofu state migration tool for GitOps. Its README frames Terraform state operations as code: write state moves, removals, imports, and related operations in HCL, review them in git, then plan and apply them in sequence.
The project was created to address a common production Terraform problem: state manipulations are unavoidable during refactoring, but raw `terraform state` commands are error-prone and do not fit well into pull-request and CI/CD workflows. tfmigrate's README explicitly argues that state operations should be committed to git.
The tool wraps Terraform or OpenTofu under the hood rather than reimplementing their state mechanics. It supports dry-run planning with temporary local state, migration history, local/S3/GCS storage for applied migration records, monorepo-style state splits and merges, and migration files written as HCL.
Recent release notes show continuing maintenance for the changing Terraform ecosystem, including support for OpenTofu versions, Terraform 1.11 through 1.15, Terragrunt CLI redesign handling, configurable environment injection into `.tfmigrate.hcl`, and GitHub Actions and Go toolchain updates.
The repository shows more than a thousand GitHub stars and is packaged by Homebrew, MacPorts, and Nix in the input metadata. That adoption profile fits a tool used by infrastructure teams with long-lived Terraform states and CI-based review.
tfmigrate's appeal is strongest for teams that already use GitOps: it lets state migrations travel with the configuration change they support, instead of being performed manually before or after a merge.
The documented workflow is to write a migration file such as `state_mv.hcl`, run `tfmigrate plan` to verify the state operation against Terraform plan output without updating remote state, and then run `tfmigrate apply` to push the migrated state when the plan is clean.
tfmigrate can invoke `terraform`, `tofu`, or Terragrunt via `TFMIGRATE_EXEC_PATH`, and the README recommends trying the included sandbox before using the tool on production state.
tfmigrate is important in package metadata because it solves a lifecycle problem that plain Terraform intentionally leaves low-level. It turns one-off state surgery into reviewable, repeatable migration files.
As a package-manager tool, it is most useful when installed in CI images and developer machines beside Terraform/OpenTofu, making the same state migration command available during local rehearsal and automated review.
security posture
narrow executable package without higher-risk signals.
green risk · low confidence · appliance
Before unattended agent use, check whether the tool reads plaintext credentials, writes remote state, publishes artifacts, or shells out to plugins.
local files
These source-backed paths show where this package keeps local settings or durable credentials. Automic Vault can use them as review targets for secret scanning, migration, and command approval.
Config paths the tool may read or write during local use.
.tfmigrate.hclexecutables
| Command | Kind | Exposure | Note |
|---|---|---|---|
tfmigrate | cli | global executable |
freshness
These signals separate page generation age, package-manager activity, and upstream release comparison. Version lag is warned only when an evidence URL and comparable versions are present.
https://github.com/minamijoyo/tfmigrate
install metadata
| Package key | brew:tfmigrate |
|---|---|
| Version | 0.4.5 |
| Package manager | Homebrew |
| Package manager page | https://formulae.brew.sh/formula/tfmigrate |
| Homepage | https://github.com/minamijoyo/tfmigrate |
| Repository | https://github.com/minamijoyo/tfmigrate |
| Upstream docs | https://github.com/minamijoyo/tfmigrate |
| License | MIT |
| Source archive | https://github.com/minamijoyo/tfmigrate/archive/refs/tags/v0.4.5.tar.gz |
| Last updated | 2026-05-15T01:31:36+09:00 |
| Pulse | updated |
| Build dependencies | go |
| Bottle | available (on arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, sonoma, x86_64_linux) |
| Homebrew post-install | not defined |
| Service | none declared |
registry facts
| Source Database | Homebrew formula API |
|---|---|
| Tap | homebrew/core |
| Full Name | tfmigrate |
| Version Scheme | 0 |
| Revision | 0 |
| Head Version | HEAD |
| Bottle Stable Root URL | https://ghcr.io/v2/homebrew/core |
| Deprecated | no |
| Disabled | no |
| Keg Only | no |
| URL Keys |
|
source database matches
Matches are pulled from external package-manager indexes and kept separate from local Automic Vault package links.
tfmigrate
nix profile install nixpkgs#tfmigratetfmigrate
sudo port install tfmigratesource trail
This page is generated by av-web from the private package SQLite artifact built by scripts/generate-pkg-sqlite.py.
View the package source record on GitHub.