Installa Terraform

Questa pagina descrive i passaggi per installare Terraform per Trusted Cloud in Cloud Shell e in una shell locale. Cloud Shell è un ambiente shell interattivo per Trusted Cloud che ti consente di imparare e sperimentare con Trusted Cloud e gestire i tuoi progetti e risorse dal browser web.

Per una guida introduttiva all'utilizzo di Terraform con Trusted Cloud, consulta la guida rapida a Terraform per Trusted Cloud .

Cloud Shell

  1. Per utilizzare un terminale online con gcloud CLI e Terraform già configurati, attiva Cloud Shell:

    Nella parte inferiore di questa pagina viene avviata una sessione di Cloud Shell e viene visualizzato un prompt della riga di comando. L'inizializzazione della sessione può richiedere alcuni secondi.

  2. Esegui questo comando per verificare che Terraform sia disponibile:

    terraform
    

    L'output dovrebbe essere simile al seguente:

    
    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. Per utilizzare Terraform con Trusted Cloud, assicurati che le seguenti attività siano completate in Trusted Cloud:

Shell locale

  1. Utilizza le istruzioni di installazione fornite da Terraform.

  2. Esegui questo comando per verificare che Terraform sia disponibile:

    terraform
    

    L'output dovrebbe essere simile al seguente:

    
     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. Per utilizzare Terraform con Trusted Cloud, assicurati che le seguenti attività siano completate in Trusted Cloud:

Passaggi successivi