0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

【HashiCorp】Terraform Cli / Vault CLIのインストール

Posted at

1.Hashicorp Terrafom/Vault CLIのインストールガイド

各CLIインストールの個人メモです。
Hasicorp社のガイドはこちら。

https://developer.hashicorp.com/terraform/install
https://developer.hashicorp.com/vault/install

2.Terraform CLIのインストール

Windows

  • モジュールをダウンロード
  • 任意のディレクトリに配置
  • Powershellを起動して、PAHT設定(システム環境変数の場合は、"Machine")
$oldPath = [Environment]::GetEnvironmentVariable("Path", "User")
$newPath = "$oldPath;C:\<モジュール配置先フォルダ>"
[Environment]::SetEnvironmentVariable("Path", $newPath, "User")
[Environment]::GetEnvironmentVariable("Path", "User")

確認

C:\Users\>terraform version
Terraform v1.11.4
on windows_amd64

Linux(Ubuntu)

  • 下記コマンドを実行
wget -O - https://apt.releases.hashicorp.com/gpg | sudo gpg --dearmor -o /usr/share/keyrings/hashicorp-archive-keyring.gpg
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/hashicorp-archive-keyring.gpg] https://apt.releases.hashicorp.com $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/hashicorp.list
sudo apt update && sudo apt install terraform

確認

$ terraform version
Terraform v1.11.4
on linux_amd64

MaC

環境がないため、ガイドを参照ください。
https://developer.hashicorp.com/terraform/install#darwin

3.Vault CLIのインストール

Windows

  • モジュールをダウンロード
  • 任意のディレクトリに配置
  • Powershellを起動して、PAHT設定(システム環境変数の場合は、"Machine")
$oldPath = [Environment]::GetEnvironmentVariable("Path", "User")
$newPath = "$oldPath;C:\<モジュール配置先フォルダ>"
[Environment]::SetEnvironmentVariable("Path", $newPath, "User")
[Environment]::GetEnvironmentVariable("Path", "User")

確認

C:\Users\>vault version
Vault v1.19.3 (a2de3bb7bcf4a073cbb8724863a5a88d3c2f83da), built 2025-04-29T10:34:52Z

Linux(Ubuntu)

  • 下記コマンドを実行。Ubuntu以外のLinuxについてはガイドを参照ください。
wget -O - https://apt.releases.hashicorp.com/gpg | sudo gpg --dearmor -o /usr/share/keyrings/hashicorp-archive-keyring.gpg
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/hashicorp-archive-keyring.gpg] https://apt.releases.hashicorp.com $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/hashicorp.list
sudo apt update && sudo apt install vault

確認

$ vault version
Vault v1.19.3 (a2de3bb7bcf4a073cbb8724863a5a88d3c2f83da), built 2025-04-29T10:34:52Z

MaC

環境がないため、ガイドを参照ください。
https://developer.hashicorp.com/vault/install#darwin

以上です。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?