Mac使用Homebrew安裝Terraform (CLI)。
安裝環境
- macOS Big Sur (Version 11.4)
- Homebrew 3.3.1
在終端機(terminal)輸入$ brew tap hashicorp/tap
加入hashicorp的repository。
$ brew tap hashicorp/tap
==> Tapping hashicorp/tap
Cloning into '/usr/local/Homebrew/Library/Taps/hashicorp/homebrew-tap'...
remote: Enumerating objects: 1609, done.
remote: Counting objects: 100% (363/363), done.
remote: Compressing objects: 100% (245/245), done.
remote: Total 1609 (delta 240), reused 205 (delta 118), pack-reused 1246
Receiving objects: 100% (1609/1609), 290.72 KiB | 651.00 KiB/s, done.
Resolving deltas: 100% (936/936), done.
Tapped 1 cask and 11 formulae (42 files, 411.7KB).
執行完接著輸入brew install terraform
安裝terraform命令工具。
$ brew install terraform
==> Downloading https://ghcr.io/v2/homebrew/core/terraform/manifests/1.0.10
######################################################################## 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/terraform/blobs/sha256:143dad24
==> Downloading from https://pkg-containers.githubusercontent.com/ghcr1/blobs/sh
######################################################################## 100.0%
==> Pouring terraform--1.0.10.big_sur.bottle.tar.gz
🍺 /usr/local/Cellar/terraform/1.0.10: 6 files, 59.5MB
輸入terraform version
出現版本資訊即安裝成功。
$ terraform version
Terraform v1.0.10
on darwin_amd64
更新版本則輸入brew upgrade terraform
。
沒有留言:
張貼留言