Instale o Terraform

Esta página descreve os passos para instalar o Terraform Trusted Cloud no Cloud Shell e numa shell local. A Cloud Shell é um ambiente de shell interativo para Trusted Cloud que lhe permite aprender e experimentar Trusted Cloud e gerir os seus projetos e recursos a partir do navegador de Internet.

Para um guia introdutório à utilização do Terraform com o Trusted Cloud, consulte o Início rápido do Terraform para o Trusted Cloud .

Cloud Shell

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

    Na parte inferior desta página, é iniciada uma sessão do Cloud Shell e é apresentado um comando. A sessão pode demorar alguns segundos a ser inicializada.

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

    terraform
    

    O resultado deve ser semelhante ao seguinte:

    
    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 Trusted Cloud, deve garantir que as seguintes tarefas são concluídas no Trusted Cloud:

Shell local

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

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

    terraform
    

    O resultado deve ser semelhante ao seguinte:

    
     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 Trusted Cloud, deve garantir que as seguintes tarefas são concluídas no Trusted Cloud:

O que se segue?