이 페이지에서는 Cloud Shell 및 로컬 셸에서Google Cloud 용 Terraform을 설치하는 단계를 설명합니다. Cloud Shell은 Google Cloud 학습 및 실험을 수행하고 웹브라우저에서 프로젝트 및 리소스를 관리할 수 있는 Google Cloud용 대화형 셸 환경입니다.
Google Cloud에서 Terraform을 사용하는 방법에 관한 소개 가이드는 Google Cloud 용 Terraform 빠른 시작을 참고하세요.
Cloud Shell
이미 gcloud CLI 및 Terraform이 설정된 온라인 터미널을 사용하려면 Cloud Shell을 활성화합니다.
이 페이지 하단에서 Cloud Shell 세션이 시작되고 명령줄 프롬프트가 표시됩니다. 세션이 초기화되는 데 몇 초 정도 걸릴 수 있습니다.
다음 명령어를 실행하여 Terraform을 사용할 수 있는지 확인합니다.
terraform
출력은 다음과 비슷하게 표시됩니다.
Usage: terraform [global options] <subcommand> [args] The available commands for execution are listed below. The primary workflow commands are given first, followed by less common or more advanced commands. Main commands: init Prepare your working directory for other commands validate Check whether the configuration is valid plan Show changes required by the current configuration apply Create or update infrastructure destroy Destroy previously-created infrastructure
Google Cloud에서 Terraform을 사용하려면 Google Cloud내에 다음 태스크가 완료되어야 합니다.
- Google Cloud 프로젝트를 만들거나 보유
- Google Cloud 프로젝트에 결제를 사용 설정
- 사용하려는Google Cloud 서비스에 대해 API를 사용 설정
- Terraform의 인증을 설정.
로컬 셸
Terraform에서 제공하는 설치 안내를 따릅니다.
다음 명령어를 실행하여 Terraform을 사용할 수 있는지 확인합니다.
terraform
출력은 다음과 비슷하게 표시됩니다.
Usage: terraform [global options] <subcommand> [args] The available commands for execution are listed below. The primary workflow commands are given first, followed by less common or more advanced commands. Main commands: init Prepare your working directory for other commands validate Check whether the configuration is valid plan Show changes required by the current configuration apply Create or update infrastructure destroy Destroy previously-created infrastructure
Google Cloud에서 Terraform을 사용하려면 Google Cloud내에 다음 태스크가 완료되어야 합니다.
- Google Cloud 프로젝트를 만들거나 보유
- Google Cloud 프로젝트에 결제를 사용 설정
- 사용하려는Google Cloud 서비스에 대해 API를 사용 설정
- Terraform의 인증을 설정.
다음 단계
- Google Cloud 용 Terraform 빠른 시작 살펴보기
- 기본 Terraform 명령어에 대해 알아보기