카테고리 없음

Terraform 설치 방법 (2025 기준 최신)

idea9329 2025. 12. 3. 17:09
728x90
반응형

🟦 1. Windows 설치 방법

방법 A) 공식 설치 프로그램(msi) 사용 — 가장 쉬움

  1. 아래 페이지 접속
    https://developer.hashicorp.com/terraform/install
  2. Windows → Download MSI 클릭
  3. 설치 마법사 Next → Next → Finish
  4. 설치 후 PowerShell에서 확인
  5. terraform -version

방법 B) 바이너리(zip) 직접 설치

  1. 다운로드 페이지 접속
    https://releases.hashicorp.com/terraform/
  2. Windows용 zip 다운로드
  3. 압축 해제 후 terraform.exe 파일을
    C:\terraform 같은 폴더로 이동
  4. 환경변수 PATH 등록
    • 시스템 속성 → 고급 → 환경 변수
    • PATH에 C:\terraform 추가
  5. PowerShell에서 확인
  6. terraform -version

🟩 2. macOS 설치 방법

방법 A) Homebrew — 가장 간단

brew tap hashicorp/tap
brew install hashicorp/tap/terraform

업데이트는:

brew upgrade hashicorp/tap/terraform

방법 B) 바이너리 직접 설치

  1. https://releases.hashicorp.com/terraform/ 접속
  2. macOS arm64(Apple Silicon) 또는 amd64(Intel) 선택
  3. 다운로드 후 압축 해제
  4. /usr/local/bin 또는 /opt/homebrew/bin 로 이동
  5. 확인
  6. 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
반응형