Automic VaultAutomic Vault

brew

使用 Homebrew, MacPorts, Nix 安装 tfmigrate

查看 tfmigrate 的安装路径、可执行文件、元数据以及面向 AI 代理工作流的安全说明。

安装

其他安装命令

macOS

Homebrew已验证 · 100%
brew install tfmigrate

local Homebrew formula metadata

MacPorts已验证 · 94%
sudo port install tfmigrate

MacPorts ports tree · sysutils/tfmigrate/Portfile · 来源: api.github.com

Linux

Nix已验证 · 92%
nix profile install nixpkgs#tfmigrate

nixpkgs package indexes · pkgs/by-name/tf/tfmigrate/package.nix · 来源: api.github.com

概览

软件包摘要

Terraform/OpenTofu state migration tool for GitOps

命令和别名

  • tfmigrate

历史

项目历史与用法

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.

时间线

  • 2025: v0.4.2 release notes add OpenTofu 1.9, Terraform 1.11, Terragrunt CLI redesign handling, and environment injection into `.tfmigrate.hcl`.
  • 2025: v0.4.3 release notes add OpenTofu 1.10 and Terraform 1.12 support.
  • 2025: v0.4.4 release notes add OpenTofu 1.11 and Terraform 1.14 support.
  • 2026: v0.4.5 is listed as the latest release and includes Terraform 1.15 support.

Related projects

  • Terraform and OpenTofu are the execution engines tfmigrate invokes.
  • Terragrunt is supported through `TFMIGRATE_EXEC_PATH` with version-specific guidance.
  • Digger is mentioned in recent release notes as an integration example.

安全态势

风险级别:绿色

narrow executable package without higher-risk signals.

风险分类器

绿色 风险 · 低 置信度 · appliance

原因

  • narrow executable package without higher-risk signals

信号

  • metadata:no-higher-risk-signals

安装行为

  • formula 元数据中未记录 Homebrew post-install 钩子。
  • Homebrew bottle 元数据适用于 6 个平台目标。
  • 构建元数据列出 1 个构建依赖。

建议审查

在无人值守的代理使用前,请检查该工具是否读取明文凭据、写入远程状态、发布制品或调用插件。

local files

Configuration and credential file locations

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.

Configuration files

Config paths the tool may read or write during local use.

Unix
.tfmigrate.hcl

可执行文件

已安装的可执行文件

命令类型暴露范围备注
tfmigratecli全局可执行文件

新鲜度

版本和新鲜度

这些信号区分页生成时间、软件包管理器活动和上游发布比较。只有存在证据 URL 和可比较版本时,才会提示版本落后。

页面生成时间2026-07-26
管理器版本0.4.5
管理器更新时间2026-05-15
本地数据OK
上游当前
检测到的最新版本v0.4.5

https://github.com/minamijoyo/tfmigrate

  • OK没有生成新鲜度警告。

安装元数据

软件包元数据

软件包键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
Pulseupdated
构建依赖go
Bottle可用 (于 arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, sonoma, x86_64_linux)
Homebrew post-install未定义
服务未声明

注册表事实

源数据库详情

Source DatabaseHomebrew formula API
Taphomebrew/core
Full Nametfmigrate
Version Scheme0
Revision0
Head VersionHEAD
Bottle Stable Root URLhttps://ghcr.io/v2/homebrew/core
Deprecatedno
Disabledno
Keg Onlyno
URL Keys
  • head
  • stable

源数据库匹配

其他软件包管理器记录

匹配项来自外部软件包管理器索引,并与本地 Automic Vault 软件包链接分开显示。

Nix95%

tfmigrate

nix profile install nixpkgs#tfmigrate
  • normalized package name match
  • 匹配方式:Tfmigrate
nixpkgs package indexes · api.github.com · nixpkgs package indexes: pkgs/by-name/tf/tfmigrate/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
MacPorts95%

tfmigrate

sudo port install tfmigrate
  • normalized package name match
  • 匹配方式:Tfmigrate
MacPorts ports tree · api.github.com · MacPorts ports tree: sysutils/tfmigrate/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1

来源线索

由仓库数据生成

此页面由 av-webscripts/generate-pkg-sqlite.py 生成的私有软件包 SQLite 工件提供。

使用的来源

  • Geiger risk classifier
  • Nucleus package database
  • av.db category and tag curation
  • cross-ecosystem install command graph
  • curated configuration and credential file locations
  • curated package history
  • external package-manager database matches
  • package relationship graph
  • package version freshness
  • package-page enrichment