Skip to main content

HCP Terraform

Visualize Terraform Cloud data, map Terraform Cloud users to employees, and monitor changes through queries and alerts.

Installation​

To add this integration within your JupiterOne workspace, you will need an HCP Terraform (formerly Terraform Cloud) or Terraform Enterprise API token for an account that is a member of the organization you want to ingest.

Prerequisites​

  • An HCP Terraform or Terraform Enterprise account that is a member of the organization named in the integration configuration.
  • Team membership that grants at minimum the Read permission for runs on the workspaces you want to ingest. See Workspace Permissions.
  • To ingest the full set of teams and the complete organization membership roster, use an organization owner, an owners-team token, or an organization token.
  • Team management features require an HCP Terraform Essentials, Standard, or Premium edition. See Teams.
info

See HCP Terraform's API documentation for more information on authentication and API tokens.

Creating an API token​

You can use a user, team, or organization API token. The following steps create a user API token:

  1. Sign in to HCP Terraform at https://app.terraform.io/.
  2. Click your user icon, then select Account settings.
  3. In the sidebar, click Tokens.
  4. Click Create an API token, enter a Description, choose an expiration, and click Create API token.
  5. Copy the token immediately. HCP Terraform displays it only once.
note

Only organization owners can generate an organization token. For a team or organization token, go to Organization settings then API Tokens. See API Tokens.

Configuration in JupiterOne​

To install the Terraform Cloud integration in JupiterOne, navigate to the Integrations tab in JupiterOne and select Terraform Cloud. Click New Instance to begin configuring your integration.

Creating an instance requires the following:

  • Account Name used to identify the integration instance in JupiterOne. Ingested entities have this value stored in tag.AccountName when the AccountName toggle is enabled.

  • Description to assist in identifying the integration instance, if desired.

  • Polling Interval that you feel is sufficient for your monitoring needs. You may leave this as DISABLED and manually execute the integration.

  • Your API Key, the HCP Terraform or Terraform Enterprise API token you created above.

  • The Organization Name, the name of the Terraform organization to ingest (for example, jupiterone).

  • For Terraform Enterprise only: the Host for your Terraform Enterprise instance (for example, https://terraform.example.com). Leave this empty to use HCP Terraform at https://app.terraform.io.

Click Create once all values are provided to finalize the integration.

Next steps​

Now that your integration instance has been configured, it will begin running on the polling interval you provided, populating data within JupiterOne. Continue on to our Instance management guide to learn more about working with and editing integration instances.