Instal Terraform

Halaman ini menjelaskan langkah-langkah untuk menginstal Terraform untuk Trusted Cloud di Cloud Shell dan di shell lokal. Cloud Shell adalah lingkungan shell interaktif untuk Trusted Cloud yang memungkinkan Anda mempelajari dan bereksperimen dengan Trusted Cloud serta mengelola project dan resource dari browser web.

Untuk panduan pengantar penggunaan Terraform dengan Trusted Cloud, lihat Mulai Cepat Terraform untuk Trusted Cloud .

Cloud Shell

  1. Untuk menggunakan terminal online dengan gcloud CLI dan Terraform yang sudah disiapkan, aktifkan Cloud Shell:

    Di bagian bawah halaman ini, sesi Cloud Shell akan dimulai dan menampilkan perintah command line. Diperlukan waktu beberapa detik untuk melakukan inisialisasi sesi.

  2. Jalankan perintah berikut untuk memverifikasi bahwa Terraform tersedia:

    terraform
    

    Outputnya akan mirip dengan berikut ini:

    
    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. Untuk menggunakan Terraform dengan Trusted Cloud, Anda harus memastikan tugas berikut diselesaikan dalam Trusted Cloud:

Shell lokal

  1. Gunakan petunjuk penginstalan yang disediakan oleh Terraform.

  2. Jalankan perintah berikut untuk memverifikasi bahwa Terraform tersedia:

    terraform
    

    Outputnya akan mirip dengan berikut ini:

    
     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. Untuk menggunakan Terraform dengan Trusted Cloud, Anda harus memastikan tugas berikut diselesaikan dalam Trusted Cloud:

Langkah berikutnya