Skip to main content

Configure Terraform Cloud Integration

To connect Terraform Cloud with Styra DAS, you will need a Terraform Cloud Organization API Token, which allows DAS to create the Run Task integration in your Terraform Cloud organization.

Organization API Tokens are a type of token intended for initial setup tasks within Terraform Cloud. Organizations can have only one valid Organization API Token at a time, and these tokens can only be generated by a Terraform Cloud user with organization owner permissions.

Refer to Terraform Cloud's Organization API Tokens documentation for additional details and instructions for generating this token. Once you generate this token, keep the token handy for the next step as the token value will not be shown again if you navigate away in Terraform Cloud.

important

In order for DAS to be temporarily granted access to create a Terraform Cloud run task, the Terraform Cloud API token must have organization-level authorization. The Terraform Cloud Organization API token is not stored by DAS and will be used only once to establish the Run Task integration. This token can be rotated in Terraform Cloud after one-time use for this integration.

Styra then secures the post-install Run Task integration by using a private HMAC Key for communication with Terraform Cloud.

Connect DAS to Terraform Cloud

  1. In the Styra DAS UI, navigate to your DAS workspace in the left-hand navigation menu under WORKSPACE. Go to the workspace's Settings >> Terraform Integration pane and fill in the following information:

    • Terraform Cloud Organization: Enter the Terraform Cloud organization name as used in Terraform Cloud. Refer to Terraform Cloud's Organization Settings documentation for details on where to find your organization name.

    • Terraform Cloud API token: Enter the Terraform Cloud Organization API Token generated above.

  2. Click the Save changes button.

    Once the integration has been successfully created, you should see the Terraform Cloud organization URL for your organization and the Terraform Cloud run-task URL for the run task created by Styra DAS.