Skip to main content
Welcome to this hands-on lab. In this guide, you’ll sign up for Terraform Cloud, create your first organization, and integrate the Terraform CLI with Terraform Cloud. By the end, you’ll be ready to manage infrastructure seamlessly across any cloud.
The image shows a webpage from KodeKloud about Terraform Cloud signup and setup, with a terminal interface on the right side.

Table of Contents


Task 1: Sign Up for Terraform Cloud

Begin by navigating to the Terraform website:
  1. Go to terraform.io and click Try Terraform Cloud.
  2. On the signup form, enter your desired Username, Email, and Password, then submit.
The image shows a webpage for HashiCorp Terraform, highlighting options for automating infrastructure on any cloud with links to download the open-source version or try Terraform Cloud.
The image shows a Terraform Cloud account creation page with fields for username, email, and password, alongside a section highlighting the benefits of using Terraform Cloud.
If you already have an account, click Sign In instead of creating a new one.

Task 2: Create a Terraform Cloud Organization

Once you’re logged in, Terraform Cloud prompts you to create a new organization if none exists. Organization names must be unique across all Terraform Cloud users.
  1. Enter a globally unique Organization Name.
  2. Confirm your email address.
  3. Click Create organization.
The image shows a webpage for creating a new organization in Terraform Cloud, with fields for organization name and email address. There is a button labeled "Create organization" at the bottom.
In this lab, our example org is named Mastering Terraform Cloud. You’ll see the new organization dashboard, ready for workspace and settings configuration.

Task 3: Authenticate via the CLI

To link your local Terraform CLI to Terraform Cloud, generate an API token:
  1. Run the login command in your terminal:
  2. When prompted, confirm by typing yes:
  3. Terraform opens a browser window to the tokens page:
  4. On the Terraform Cloud website, create a new token (e.g., Terraform login – Mastering Terraform Cloud) and copy it.
The image shows a web page with a pop-up window displaying a newly created API token for Terraform Cloud. The token is shown with an option to copy it, and there is a "Done" button at the bottom.
  1. Paste the token back into the CLI (it will be hidden as you type):
Upon successful authentication, you’ll see a confirmation message:
Your API token is stored in plain text at ~/.terraform.d/credentials.tfrc.json. To remove it, run:

Summary of Tasks


Watch Video