Configure HCP Terraform

Create an Organization for the Project

1. Go to https://app.terraform.io/app and sign in. If you do not already have an account, click Sign up to create a new one.

2. On the main interface, select Create organization to start creating an organization for the project.

HCP Terraform

3. In the Create organization window, choose the Personal organization type, enter the organization name and email address, then click Create organization.

HCP Terraform

4. After the organization is created, you will see it listed on the Organizations page.

HCP Terraform

5. Open the organization you just created. Here, we will create a Workspace to store and manage the Terraform state for the project.

HCP Terraform

6. Select Default Project.

HCP Terraform

7. Choose CLI-Driven Workflow.

HCP Terraform

8. Enter a name for the Workspace, then click Create.

HCP Terraform

9. Next, add the following two environment variables to the Workspace and mark them as Sensitive to protect your AWS credentials.

  • AWS_ACCESS_KEY_ID

  • AWS_SECRET_ACCESS_KEY

  • In the Workspace, open the Variables tab, then click Add variable.

HCP Terraform

  • Enter the required information for each variable.

HCP Terraform

HCP Terraform

Next Section