# tfmigrate を Homebrew, MacPorts, Nix でインストール

tfmigrate のインストール経路、実行ファイル、メタデータ、AI エージェント向けセキュリティノートを確認します。

## インストール

```sh
sudo av install brew:tfmigrate
```

追加のインストールコマンド:

### macOS

- Homebrew (100%):

```sh
brew install tfmigrate
```

  証拠: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install tfmigrate
```

  証拠: MacPorts ports tree: sysutils/tfmigrate/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1

### Linux

- Nix (92%):

```sh
nix profile install nixpkgs#tfmigrate
```

  証拠: nixpkgs package indexes: pkgs/by-name/tf/tfmigrate/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1

## パッケージ情報

- **パッケージキー:** brew:tfmigrate
- **パッケージマネージャ:** Homebrew
- **パッケージマネージャページ:** <https://formulae.brew.sh/formula/tfmigrate>
- **バージョン:** 0.4.5
- **ソース概要:** Terraform/OpenTofu state migration tool for GitOps
- **ホームページ:** <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-07-26T00:50:39+02:00
- **生成日時:** 2026-08-04T22:13:35+00:00

## 実行可能ファイル

- tfmigrate (cli)
- tfmigrate (エイリアス)

## ビルド依存関係

- go

## インストール挙動

- post-install フック: 未定義
- Bottle: 利用可能 対象 arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, sonoma, x86_64_linux

## バージョンと鮮度

- ページ生成日: 2026-08-04
- マネージャ版: 0.4.5
- マネージャ更新日: 2026-07-26
- ローカルデータ: OK
- 上流リポジトリ: https://github.com/minamijoyo/tfmigrate
- 検出された最新: v0.4.5 (最新)
## プロジェクトの歴史と使われ方

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.

### ソース

- <https://github.com/minamijoyo/tfmigrate>
- <https://github.com/minamijoyo/tfmigrate/releases>
- source_facts.package-manager


## セキュリティノート

narrow executable package without higher-risk signals.

- **Geiger リスク:** グリーン / 低
- narrow executable package without higher-risk signals


## 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

- Unix: .tfmigrate.hcl
## ソースデータベース詳細

- **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:** head, stable

## 他のパッケージマネージャ記録

- Nix - tfmigrate: normalized package name match | nixpkgs package indexes: pkgs/by-name/tf/tfmigrate/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- MacPorts - tfmigrate: normalized package name match | MacPorts ports tree: sysutils/tfmigrate/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1


## 関連リンク

- [Cloud CLI packages](https://pkg.so/ja/cloud-clis/) - Belongs to a cloud or infrastructure command family.
- [Source-control packages](https://pkg.so/ja/source-control-tools/) - Belongs to a source-control command family.
- [Terminal utility packages](https://pkg.so/ja/terminal-utilities/) - Matched terminal and command-line workflow metadata.
- [Text processing packages](https://pkg.so/ja/text-processing-tools/) - Matched text, document, or structured-data processing metadata.
- [go](https://pkg.so/ja/brew/go/) - Build dependency declared by Homebrew.
- [tfupdate](https://pkg.so/ja/brew/tfupdate/) - Shares pkgdb curated category or tags: cli, developer-tools, infrastructure-as-code, opentofu, terraform.
- [tfschema](https://pkg.so/ja/brew/tfschema/) - Shares pkgdb curated category or tags: cli, developer-tools, infrastructure-as-code, opentofu, terraform.
- [tfautomv](https://pkg.so/ja/brew/tfautomv/) - Shares pkgdb curated category or tags: cli, developer-tools, infrastructure-as-code, opentofu, terraform.
- [terragrunt](https://pkg.so/ja/brew/terragrunt/) - Shares pkgdb curated category or tags: cli, developer-tools, opentofu, terraform.
- [tfenv](https://pkg.so/ja/brew/tfenv/) - Shares pkgdb curated category or tags: cli, developer-tools, infrastructure-as-code, terraform.
- [terraform-docs](https://pkg.so/ja/brew/terraform-docs/) - Shares pkgdb curated category or tags: cli, developer-tools, infrastructure-as-code, terraform.
- [tenv](https://pkg.so/ja/brew/tenv/) - Shares pkgdb curated category or tags: cli, developer-tools, opentofu, terraform.
- [tf-summarize](https://pkg.so/ja/brew/tf-summarize/) - Shares pkgdb curated category or tags: cli, developer-tools, infrastructure-as-code, terraform.

## Combined YAML source

View the package source record on GitHub. [combined/tfmigrate.yml](https://github.com/mxcl/pkgdb/blob/main/combined/tfmigrate.yml)


## ソース

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