macOS
brew install tfmigratelocal Homebrew formula metadata
sudo port install tfmigrateMacPorts ports tree · sysutils/tfmigrate/Portfile · 来源: api.github.com
安装
brew install tfmigratelocal Homebrew formula metadata
sudo port install tfmigrateMacPorts ports tree · sysutils/tfmigrate/Portfile · 来源: api.github.com
nix profile install nixpkgs#tfmigratenixpkgs package indexes · pkgs/by-name/tf/tfmigrate/package.nix · 来源: api.github.com
概览
Terraform/OpenTofu state migration tool for GitOps
历史
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.
安全态势
narrow executable package without higher-risk signals.
绿色 风险 · 低 置信度 · appliance
在无人值守的代理使用前,请检查该工具是否读取明文凭据、写入远程状态、发布制品或调用插件。
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.hcl可执行文件
| 命令 | 类型 | 暴露范围 | 备注 |
|---|---|---|---|
tfmigrate | cli | 全局可执行文件 |
新鲜度
这些信号区分页生成时间、软件包管理器活动和上游发布比较。只有存在证据 URL 和可比较版本时,才会提示版本落后。
https://github.com/minamijoyo/tfmigrate
安装元数据
| 软件包键 | brew:tfmigrate |
|---|---|
| 版本 | 0.4.5 |
| 软件包管理器 | Homebrew |
| 软件包管理器页面 | https://formulae.brew.sh/formula/tfmigrate |
| 主页 | https://github.com/minamijoyo/tfmigrate |
| 仓库 | https://github.com/minamijoyo/tfmigrate |
| 上游文档 | https://github.com/minamijoyo/tfmigrate |
| 许可证 | MIT |
| 源码归档 | https://github.com/minamijoyo/tfmigrate/archive/refs/tags/v0.4.5.tar.gz |
| 最后更新 | 2026-05-15T01:31:36+09:00 |
| Pulse | updated |
| 构建依赖 | go |
| Bottle | 可用 (于 arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, sonoma, x86_64_linux) |
| Homebrew post-install | 未定义 |
| 服务 | 未声明 |
注册表事实
| 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 |
|
源数据库匹配
匹配项来自外部软件包管理器索引,并与本地 Automic Vault 软件包链接分开显示。
tfmigrate
nix profile install nixpkgs#tfmigratetfmigrate
sudo port install tfmigrate来源线索
此页面由 av-web 从 scripts/generate-pkg-sqlite.py 生成的私有软件包 SQLite 工件提供。
View the package source record on GitHub.