Skip to content
manage-version logo

Version Manager

manage-version

Terraform/Terragrunt のバージョンを管理する。「terraform バージョン」「tfenv」「tgswitch」「tf バージョン切り替え」「terraform インストール」「バージョン確認」「tf version」「terraform 1.5 にして」「tg バージョン」などで起動。

SKILL.md

Full skill instructions

Version Manager

tfenv/​tgswitch を使用して Terraform/​Terragrunt のバージョンを管理します。

対応操作

操作トリガー例コマンド
バージョン確認「バージョン確認」「tf version」terraform version
一覧表示「インストール済み一覧」「tfenv list」tfenv list
リモート一覧「利用可能バージョン」「list-remote」tfenv list-remote
インストール「1.5.0 インストール」「install」tfenv install
切り替え「1.5.0 に切り替え」「use」tfenv use

実行手順

1. ツールの確認

# tfenv の確認
which tfenv && tfenv --version

# tgswitch の確認
which tgswitch && tgswitch --version

# tenv の確認(統合ツール)
which tenv && tenv --version

2. 現在のバージョン確認

Terraform:

terraform version

Terragrunt:

terragrunt --version

3. インストール済みバージョン一覧

tfenv:

tfenv list

tgswitch:

tgswitch --list-all

4. 利用可能なバージョン一覧

tfenv:

tfenv list-remote | head -20

5. バージョンインストール

tfenv:

tfenv install {version}
# 例: tfenv install 1.5.0
# 例: tfenv install latest

tgswitch:

tgswitch {version}
# 例: tgswitch 0.50.0

6. バージョン切り替え

tfenv:

tfenv use {version}
# 例: tfenv use 1.5.0

tgswitch:

tgswitch {version}

tenv(統合ツール):

# Terraform バージョン切り替え
tenv tf use {version}
# 例: tenv tf use 1.5.0

# Terragrunt バージョン切り替え
tenv tg use {version}
# 例: tenv tg use 0.50.0

# インストール
tenv tf install {version}
tenv tg install {version}

# 一覧表示
tenv tf list
tenv tg list

7. 出力フォーマット

## バージョン情報

### 現在のバージョン
- Terraform: {version}
- Terragrunt: {version}

### インストール済み(Terraform)
| バージョン | 状態 |
|-----------|------|
| 1.5.0 | ✅ 使用中 |
| 1.4.6 | |
| 1.3.9 | |

### プロジェクト設定
- .terraform-version: {内容}
- .terragrunt-version: {内容}

バージョンファイル

.terraform-version

プロジェクトで使用する Terraform バージョンを固定:

1.5.0

tfenv は自動的にこのファイルを読み取ってバージョンを切り替えます。

.terragrunt-version

プロジェクトで使用する Terragrunt バージョンを固定:

0.50.0

required_version

versions.tf でバージョン制約を設定:

terraform {
  required_version = ">= 1.5.0, < 2.0.0"
}

バージョン管理ツールのインストール

tfenv

# macOS
brew install tfenv

# 手動インストール
git clone https://github.com/​tfutils/​tfenv.git ~/​.tfenv
echo 'export PATH="$HOME/​.tfenv/​bin:$PATH"' >> ~/​.bashrc

tgswitch

# macOS
brew install warrensbox/​tap/​tgswitch

# 手動インストール
curl -L https://raw.githubusercontent.com/​warrensbox/​tgswitch/​release/​install.sh | bash

tenv(統合ツール)

# macOS
brew install tenv

# 手動インストール
curl -L https://tofuutils.github.io/​tenv/​install.sh | bash

注意事項

  • ✅ バージョン管理ツールを使うとプロジェクトごとにバージョンを切り替えられる
  • ✅ .terraform-version でチームでバージョンを統一
  • ✅ required_version で最低バージョンを保証
  • ⚠️ バージョンアップ時は互換性を確認

More DevOps & CI/CD skills

Project scaffolding, deployment configuration, and CI/CD setup for Google ADK agents.

6K 472.6K
View

Set up tracing, logging, and monitoring for deployed ADK agents across Cloud Trace, BigQuery, and third-party platforms.

6K 472.6K
View

Enterprise Azure infrastructure architect generating Bicep or Terraform from workload descriptions.

1.5K 454.3K
View
azure-kubernetes logo
DevOps & CI/CD

azure-kubernetes

Plan and configure production-ready Azure Kubernetes Service clusters with Day-0 and Day-1 best practices.

1.5K 447.1K
View

Raw mechanical interfaces fusing Swiss typographic print with military terminal aesthetics. Rigid grids, extreme type scale contrast, utilitarian color, analog degradation effects. For data-heavy dashboards, portfolios, or editorial sites that need to feel like declassified blueprints.

92.7K 354.9K
View
just-scrape logo
DevOps & CI/CD

just-scrape

Web search, scraping, extraction, crawling, and monitoring via ScrapeGraph AI CLI.

69 245K
View

Skill for working with Firebase Hosting (Classic). Use this when you want to deploy static web apps, Single Page Apps (SPAs), or simple microservices. Do NOT use for Firebase App Hosting.

462 159.7K
View

Deploy and manage web apps with Firebase App Hosting. Use this skill when deploying Next.js/Angular apps with backends.

462 159.1K
View
deploy-to-vercel logo
DevOps & CI/CD

deploy-to-vercel

Deploy applications and websites to Vercel. Use when the user requests deployment actions like "deploy my app", "deploy and give me the link", "push this live", or "create a preview deployment".

31.9K 146.6K
View
programmatic-seo logo
DevOps & CI/CD

programmatic-seo

Build SEO-optimized pages at scale using templates, data, and proven playbook patterns.

53.3K 140.1K
View

Design and build isolated, reusable Convex backend components with clear boundaries and app-facing wrappers.

63 123.5K
View

Deploy and manage projects on Vercel using token-based authentication. Use when working with Vercel CLI using access tokens rather than interactive login — e.g. "deploy to vercel", "set up vercel", "add environment variables to vercel".

31.9K 116.1K
View

Coding & apps AI tools

Opus Clip logo
Coding & apps

Opus Clip

Opus.ai: Revolutionize Your Web Experience

Free
View
Imagica logo
Coding & apps

Imagica

Build a no-code AI app in minutes.

Freemium
View
E
Coding & apps

Emergent.sh

An IDE for code migration from legacy to modern frameworks through coding agents.

Freemium
View
Wonder Dynamics logo
Coding & apps

Wonder Dynamics

Automate CGI animation in live-action scenes

Paid
View
M
Coding & apps

Mixo

Launch a website in seconds with AI.

Paid
View
AI Code Convert logo
Coding & apps

AI Code Convert

Streamline Your Coding Experience with AI Code Helper

Free
View