HashiCorp HCP Terraform Setup Instructions

HCP Terraform 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 HCP Terraform to store the Terraform state of the infrastructures your pipeline will provision and deploy using Terraform in future modules.

Create HCP Terraform Access Token

1. Visit HCP Terraform and follow the prompts to create a free HCP Terraform 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 HCP Terraform UI will ask which setup workflow you would like use. Select Start from scratch.

TerraformCloudCreateOrgScratch

2. Create a new HCP Terraform organization

Create a new HCP Terraform organization using this link:

https://app.terraform.io/app/organizations/new

TerraformCloudCreateOrg

3. Create a new HCP Terraform 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 HCP Terraform 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 HCP Terraform 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 HCP Terraform API Token.