Instale o Terraform

Nesta página, descrevemos as etapas para instalar o Terraform para Cloud de Confiance no Cloud Shell e em um shell local. O Cloud Shell é um ambiente shell interativo para Cloud de Confiance que permite aprender e testar o Cloud de Confiance e gerenciar seus projetos e recursos do navegador da Web.

Para um guia introdutório sobre como usar o Terraform com o Cloud de Confiance, consulte o Guia de início rápido do Terraform para Cloud de Confiance .

Cloud Shell

  1. Para usar um terminal on-line com a gcloud CLI e o Terraform já configurados, ative o Cloud Shell:

    Na parte de baixo desta página, uma sessão do Cloud Shell é iniciada e exibe um prompt de linha de comando. A inicialização da sessão pode levar alguns segundos.

  2. Execute o seguinte comando para verificar se o Terraform está disponível:

    terraform
    

    A saída será semelhante a esta:

    
    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. Para usar o Terraform com o Cloud de Confiance, verifique se as seguintes tarefas foram concluídas no Cloud de Confiance:

Shell local

  1. Siga as instruções de instalação fornecidas pelo Terraform.

  2. Execute o seguinte comando para verificar se o Terraform está disponível:

    terraform
    

    A saída será semelhante a esta:

    
     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. Para usar o Terraform com o Cloud de Confiance, verifique se as seguintes tarefas foram concluídas no Cloud de Confiance:

A seguir