728x90
반응형
🟦 1. Windows 설치 방법
방법 A) 공식 설치 프로그램(msi) 사용 — 가장 쉬움
- 아래 페이지 접속
https://developer.hashicorp.com/terraform/install - Windows → Download MSI 클릭
- 설치 마법사 Next → Next → Finish
- 설치 후 PowerShell에서 확인
- terraform -version
방법 B) 바이너리(zip) 직접 설치
- 다운로드 페이지 접속
https://releases.hashicorp.com/terraform/ - Windows용 zip 다운로드
- 압축 해제 후 terraform.exe 파일을
C:\terraform 같은 폴더로 이동 - 환경변수 PATH 등록
- 시스템 속성 → 고급 → 환경 변수
- PATH에 C:\terraform 추가
- PowerShell에서 확인
- terraform -version
🟩 2. macOS 설치 방법
방법 A) Homebrew — 가장 간단
brew tap hashicorp/tap
brew install hashicorp/tap/terraform
업데이트는:
brew upgrade hashicorp/tap/terraform
방법 B) 바이너리 직접 설치
- https://releases.hashicorp.com/terraform/ 접속
- macOS arm64(Apple Silicon) 또는 amd64(Intel) 선택
- 다운로드 후 압축 해제
- /usr/local/bin 또는 /opt/homebrew/bin 로 이동
- 확인
- terraform -version
🟧 3. Linux 설치 방법 (Ubuntu/Debian 기준)
A) APT 저장소 설치 (추천)
curl -fsSL https://apt.releases.hashicorp.com/gpg | sudo apt-key add -
sudo apt-add-repository "deb [arch=amd64] https://apt.releases.hashicorp.com $(lsb_release -cs) main"
sudo apt-get update && sudo apt-get install terraform
B) 바이너리 설치
wget https://releases.hashicorp.com/terraform/<버전>/terraform_<버전>_linux_amd64.zip
unzip terraform_<버전>_linux_amd64.zip
sudo mv terraform /usr/local/bin/
terraform -version
🟨 4. 설치 후 테스트
터미널/PowerShell에서 아래 실행:
terraform -version
terraform -help
🟪 5. 에러 자주 나는 부분 정리
문제원인해결
| 'terraform' not recognized | PATH 미등록 | PATH에 terraform 경로 추가 |
| 설치했는데 버전이 안 바뀜 | 예전 Terraform 충돌 | which terraform으로 위치 확인 후 삭제 |
| ARM/M1 macOS 오류 | 아키텍처 mismatch | arm64 버전 다운로드 |
728x90
반응형