Terraform Cloud Connection
Learn how to configure a Terraform Cloud Connection for Hanzo KMS.
Hanzo KMS supports connecting to Terraform Cloud using a service user.
Setup Terraform Cloud Connection in Hanzo KMS
Navigate to the Terraform Cloud Account Settings tab.

Move to the Tokens tab.

Create the API token to be used by Hanzo KMS.
If you configure an expiry date for your API token you will need to manually rotate to a new token prior to expiration to avoid integration downtime.

The API token will be displayed after creating it. Save the token in a secure location for later use in the following steps.

- Navigate to the Integrations tab in the desired project, then select App Connections.

- Select the Terraform Cloud Connection option from the connection options modal.

- Fill out the Terraform Cloud Connection modal, here you will need to provide the API Token generated in the previous step.

- Your Terraform Cloud Connection is now available for use.

To create an Terraform Cloud Connection, make an API request to the Create Terraform Cloud Connection API endpoint.
Sample request
curl --request POST \
--url https://app.kms.hanzo.ai/api/v1/app-connections/terraform-cloud \
--header 'Content-Type: application/json' \
--data '{
"name": "my-terraform-cloud-connection",
"method": "api-token",
"projectId": "7ffbb072-2575-495a-b5b0-127f88caef78",
"credentials": {
"apiToken": "...",
}
}'Sample response
{
"appConnection": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "my-terraform-cloud-connection",
"projectId": "7ffbb072-2575-495a-b5b0-127f88caef78",
"version": 123,
"orgId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"app": "terraform-cloud",
"method": "api-token",
"credentials": {
"apiToken": "..."
}
}
}How is this guide?
Last updated on