HCP Terraform

Terraform Run Task Integration

Gomboc AI for Infrastructure as Code automatically fixes misconfigurations in your Terraform code. Gomboc translates cloud policies into production-ready IaC fixes delivered as pull requests, so you can merge confidently and keep pipelines moving without disruption.

Integration Setup

Follow these steps to configure the Terraform Run Task integration:

Step 1: Access Gomboc Portal

Navigate to Settings > Integrations > HashiCorp in the Gomboc Portal.

Gomboc Integrations page showing HashiCorp section

Step 2: Create Integration

Enter a name to identify this integration and click Integrate to generate credentials.

Integration creation form

Step 3: Collect Credentials

Copy the HMAC Key and Webhook URL - you’ll need these to configure the Run Task in Terraform Cloud.

Integration credentials display

Step 4: Access HCP Organization

Now that your Gomboc-side integration is ready, let’s switch over to Terraform Cloud to finish setup. In a new tab, go to https://app.terraform.io/ and select the organization where you want to enable this integration.

HCP organization selection

Step 5: Navigate to Run Tasks

Go to Settings > Integrations > Run tasks and click "Create run task".

HCP Run Tasks page with create button

Step 6: Configure Run Task

Paste the Webhook URL and HMAC Key from Step 3 into the respective fields and add a display name.

Run task configuration form

Step 7: Set Scope and Create

Configure the scope for your Run Task and click Create.

Run task scope configuration

Configuration Options

Scope Selection

When setting the scope for your Run Task, you can choose any scope that fits your workflow needs.

Recommendation: Select any option except "post-apply" to ensure Gomboc can remediate issues before changes are applied to your infrastructure.

Enforcement Levels

You'll be prompted to select an enforcement level:

  • Advisory: Shows warnings for detected misconfigurations but does not block the Terraform run from proceeding

  • Mandatory: Shows errors for detected misconfigurations and blocks the Terraform run until issues are resolved

Choose the enforcement level that best matches your organization's policy for infrastructure changes.

Deployment Options

You can configure Run Tasks at two levels:

Organization-Level Run Tasks

  • Apply to all workspaces within the selected organization

  • Ensures consistent policy enforcement across your infrastructure

  • Recommended for most organizations

Workspace-Level Run Tasks

  • Provide more granular control for specific teams or projects

  • To configure: Skip the global setup in Step 7, then navigate to the desired workspace in HCP Terraform

  • Go to Settings > Run Tasks and add the Gomboc Run Task you created

Choose the configuration approach that best fits your workflow and organizational requirements.

Last updated