Prerequisites
- An HCP Terraform organization containing the workspaces you want to inspect.
- The organization name shown in HCP Terraform.
- An organization owner who can create or revoke the organization’s API token.
An organization token has authority across its HCP Terraform organization. CloudThinker limits its own actions to the capabilities on this page, but you should still treat the token as an organization-wide secret.
Setup
1
Select your HCP Terraform organization
Sign in to HCP Terraform, then select the organization you want to connect from the sidebar. Copy its organization name.
2
Create an organization token
Open Organization settings → API Token. Under Organization Tokens, use the displayed controls to generate the organization token, then copy it immediately.Only organization owners can generate or revoke this single organization-wide token. Before creating or rotating it, coordinate with the organization owners and any existing automations that use it.
3
Add the connection in CloudThinker
Navigate to Connections → HCP Terraform and enter:
- Organization name: the name of the organization you selected
- Organization token: the token you just created
Connection details
Required permissions
Use this organization’s single organization token, not a personal or team token. Only an organization owner can generate or revoke it. HCP Terraform organization tokens can manage organization-level resources but cannot start runs or create configuration versions.Agent capabilities
Workspace inventory and recent run status are read-only. Before creating, renaming, locking, unlocking, or safely deleting a workspace, CloudThinker asks for a separate visible approval for that action.
Limits
This connection cannot start plans, applies, or runs. It cannot upload or download configuration or state, change variables, show sensitive outputs, force unlock or force delete a workspace, delete an organization, administer teams or tokens, or connect to Terraform Enterprise custom endpoints.Verify the connection
Example prompts
Troubleshooting
Invalid HCP Terraform organization name
Invalid HCP Terraform organization name
Enter the organization name shown in HCP Terraform. Do not paste the organization URL or an HCP organization ID.
HCP Terraform organization token is invalid or expired.
HCP Terraform organization token is invalid or expired.
Create a replacement organization token if the current one is expired or no longer valid, then update Organization token and reconnect.
HCP Terraform organization was not found or the token cannot access it.
HCP Terraform organization was not found or the token cannot access it.
Check that Organization name and Organization token belong to the same HCP Terraform organization, then reconnect.
HCP Terraform token resolved a different organization.
HCP Terraform token resolved a different organization.
The token belongs to a different organization than the one entered in Organization name. Enter the matching organization name or use that organization’s token.
HCP Terraform API rate limit reached. Retry later.
HCP Terraform API rate limit reached. Retry later.
Wait and reconnect later. Do not repeatedly retry the connection while HCP Terraform is rate limiting requests.
HCP Terraform refused the state transition; a workspace may still manage resources or be locked
HCP Terraform refused the state transition; a workspace may still manage resources or be locked
For safe deletion, this can mean the workspace still manages resources. CloudThinker does not force-delete it. Keep the workspace until it is empty, and unlock it before an allowed workspace change if needed.
Security
- Least privilege — grant only the permissions the agents need for your use case; start read-only and widen later.
- Read-only by default — use read-only credentials unless you want agents to make changes through this connection.
- Rotate credentials — rotate keys and tokens on your normal schedule; CloudThinker picks up the new value when you update the connection.
- Revoke on offboarding — remove the credential at the provider when you delete a connection or a teammate leaves.
- Set and track expiration — HCP Terraform tokens expire, and you cannot change an expiration after creation. Choose the shortest duration your policy permits and replace the token before it expires.
- Coordinate rotation — only one organization token is valid at a time. Confirm which integrations use it before you generate or revoke a token.
Related
Approval
Review how CloudThinker asks before a workspace change.
Pulumi Connection
Connect another infrastructure-management service.