반응형
테라폼
- 깃헙 링크 : https://github.com/hashicorp/terraform
- 공식홈페이지 : https://www.terraform.io/
- 공홈 접속 후, Tutorial 클릭
- GET STARTED > AWS 클릭
- Install Terraform 클릭
- OS 에 맞게 설치 진행 (필자의 경우는 맥북)
- 먼저, brew tap 명령어로 hashicorp 저장소를 등록
brew tap hashicorp/tap
==> Tapping hashicorp/tap
Cloning into '/usr/local/Homebrew/Library/Taps/hashicorp/homebrew-tap'...
remote: Enumerating objects: 2238, done.
remote: Counting objects: 100% (122/122), done.
remote: Compressing objects: 100% (55/55), done.
remote: Total 2238 (delta 84), reused 86 (delta 67), pack-reused 2116
Receiving objects: 100% (2238/2238), 390.99 KiB | 8.50 MiB/s, done.
Resolving deltas: 100% (1393/1393), done.
Tapped 1 cask and 18 formulae (51 files, 545.8KB).
- terraform 설치
brew install hashicorp/tap/terraform
==> Downloading <https://releases.hashicorp.com/terraform/1.2.5/terraform_1.2.5_darwin_amd64.zip>
######################################################################## 100.0%
==> Installing terraform from hashicorp/tap
🍺 /usr/local/Cellar/terraform/1.2.5: 3 files, 67.4MB, built in 3 seconds
- 설치된 버전 확인
terraform version
Terraform v1.2.5
on darwin_amd64
테라폼 명령어 자동완성(tab completion) 설정
- .zshrc 파일이 없는 경우에는 아래 명령어 실행
touch ~/.zshrc
- 자동완성 관련 내용을 등록
terraform -install-autocomplete
- 설정 이후 zsh 다시 실행하면 적용됨
zsh
- 이제 쉘에서 terrform 하고 tab 을 치면, 자동완성이 됨
테라폼 캐시 설정
테라폼 캐시 설정을 하면, 한번 설치한 플러그인을 중앙에서 캐시로 관리함으로써, 동일한 플러그인을 여러번 다운로드 하는 것을 방지할 수 있음
- 테라폼 홈에서 Docs > Terraform CLI 메뉴 클릭
- 왼쪽 메뉴에서 CLI Configuration 클릭
세팅 가능한 설정은 아래와 같다.
The following settings can be set in the CLI configuration file:
- [credentials](<https://www.terraform.io/cli/config/config-file#credentials>) - configures credentials for use with Terraform Cloud or Terraform Enterprise. See Credentials below for more information.
- [credentials_helper](<https://www.terraform.io/cli/config/config-file#credentials_helper>) - configures an external helper program for the storage and retrieval of credentials for Terraform Cloud or Terraform Enterprise. See Credentials Helpers below for more information.
- [disable_checkpoint](<https://www.terraform.io/cli/config/config-file#disable_checkpoint>) — when set to true, disables upgrade and security bulletin checks that require reaching out to HashiCorp-provided network services.
- [disable_checkpoint_signature](<https://www.terraform.io/cli/config/config-file#disable_checkpoint_signature>) — when set to true, allows the upgrade and security bulletin checks described above but disables the use of an anonymous id used to de-duplicate warning messages.
- [plugin_cache_dir](<https://www.terraform.io/cli/config/config-file#plugin_cache_dir>) — enables plugin caching and specifies, as a string, the location of the plugin cache directory.
- [provider_installation](<https://www.terraform.io/cli/config/config-file#provider_installation>) - customizes the installation methods used by terraform init when installing provider plugins. See Provider Installation below for more information.
- 이 중에서 [plugin_cache_dir](<https://www.terraform.io/cli/config/config-file#plugin_cache_dir>) 설정을 진행
- 홈 디렉토리에 .terraformrc 파일 설정 (없는 경우 생성)
vi ~/.terraformrc
plugin_cache_dir = "$HOME/.terraform.d/plugin-cache"
- 위 내용 저장 후, 디렉토리를 생성해 준다.
반응형
'일반' 카테고리의 다른 글
macOS 에서 ip 명령어 사용하기 (0) | 2022.09.12 |
---|---|
Visual Studio Code 로 원격 서버(AWS EC2)에서 작업하기 (0) | 2022.09.12 |
macOS 초기화 후 개발자를 위한 초기 세팅 (0) | 2022.09.02 |
네이버에 내 (티스토리)블로그 사이트 검색 등록하기 (2) | 2022.09.01 |
SK텔레콤, Hadoop DW 와 데이터 분석환경 구축사례 (0) | 2022.08.27 |