HashiCorp Terraform Cloud Setup Instructions

Terraform Cloud is an application that helps teams use Terraform together. It manages Terraform runs in a consistent and reliable environment, and includes easy access to shared state and secret data, access controls for approving changes to infrastructure, a private registry for sharing Terraform modules, detailed policy controls for governing the contents of Terraform configurations, and more.

You will be using Terraform Cloud to store the Terraform state of the infrastructures your pipeline will provision and deploy using Terraform in future modules.

Create Terraform Cloud Access Token

1. Visit Terraform Cloud and follow the prompts to create a free Terraform Cloud account, if you already have an existing account sign in.

TerraformCloudCreateAccount

When you sign up, you will receive an email asking you to confirm your email address. Confirm your email address before moving on. When you click the link to confirm your email address, the Terraform Cloud UI will ask which setup workflow you would like use. Select Start from scratch.

TerraformCloudCreateOrgScratch

2. Create a new Terraform Cloud organization

To create a Terraform Cloud organization on the Trial Plan, be sure to use this link to create a new organization:

https://app.terraform.io/app/organizations/new?trial=workshop2023

TerraformCloudCreateOrg

3. Create a new Terraform Cloud workspace with CLI driven workflow.

TerraformCloudCreateWorkspace

In the workspace, set workspace name as aws-workshop

TerraformCloudWorkspaceConfig

4. Go to the User Settings section in the Terraform Cloud Dashboard and create a new API token.

TerraformCloudUserSetting

In the User Settings section, Create a new ‘Terraform API token’ then copy and paste the token in a secure location for later use.

Your Terraform Cloud API token must be protected and not shared with unauthorized parties to prevent exposure and unauthorized access.

Great, you have created and safely stored your newly created Terraform Cloud API Token.