Terraform 설치

이 페이지에서는 Cloud Shell 및 로컬 셸에서Google Cloud 용 Terraform을 설치하는 단계를 설명합니다. Cloud Shell은 Google Cloud 학습 및 실험을 수행하고 웹브라우저에서 프로젝트 및 리소스를 관리할 수 있는 Google Cloud용 대화형 셸 환경입니다.

Google Cloud에서 Terraform을 사용하는 방법에 관한 소개 가이드는 Google Cloud 용 Terraform 빠른 시작을 참고하세요.

Cloud Shell

  1. 이미 gcloud CLI 및 Terraform이 설정된 온라인 터미널을 사용하려면 Cloud Shell을 활성화합니다.

    이 페이지 하단에서 Cloud Shell 세션이 시작되고 명령줄 프롬프트가 표시됩니다. 세션이 초기화되는 데 몇 초 정도 걸릴 수 있습니다.

  2. 다음 명령어를 실행하여 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
    
    
  3. Google Cloud에서 Terraform을 사용하려면 Google Cloud내에 다음 태스크가 완료되어야 합니다.

로컬 셸

  1. Terraform에서 제공하는 설치 안내를 따릅니다.

  2. 다음 명령어를 실행하여 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
    
  3. Google Cloud에서 Terraform을 사용하려면 Google Cloud내에 다음 태스크가 완료되어야 합니다.

다음 단계