Snyk Terraform Cloud Run Task Instructions

Snyk is available in Terraform Cloud as a Run Task to leverage Snyk results in your workflow.

Your Terraform Cloud configuration must support Run Tasks. This feature is enabled in Terraform Cloud Business Plans and higher.

1. Sign In to Terraform Cloud

TerraformCloudCreateAccount

2. Navigate into your General Settings, and Run tasks

Navigate into your workspace and click on your Settings page, and then the settings page for your workspace.

TerraformCloudSettings

From the settings page navigate into your Run Tasks section from the left-side of your Integrations page. You’ll next see a button to Create run task which we’ll click.

TerraformCloudSettingsRunTasks1

You will need four pieces of information, and two come from the Snyk website. Two are values you enter, the the other two are from the Snyk website. TerraformCloudSettingsRunTasks2

At this point, you can fill in two fields.

  1. Name your run task something suitable such as snyk-run-task-for-workshop.
  2. Enter a description suitable for this workshop or leave the field blank.

Let’s next navigate to Snyk.io to get the remaining fields. Keep this page open.

Navigate to your snyk.io account and click on the integrations tab of your toolbar. SnykSettings

Search for or find the tile for Terraform Cloud. SnykTerraformCloud1

Within the Terraform Cloud configuration page, identify the fields for your URL and HMAC key. These are two values you’ll copy and enter into the Terraform Cloud page for their respective values.

We’ll also change the threashold to medium for this workshop. SnykTerraformCloud2

When you are finished, your screen will look similar to what is shown below with your details. Click on the enabled, Create run task button to finish. This process validates your URL and HMAC key. SnykTerraformCloud3

When you are finished, your will see your new run tasks added to a list of available tasks. You are ready to use the Snyk Run Task in Terraform Cloud.

Next Section: Running the Workshop

Now that you have setup Snyk and the CLI, you are ready to start your workshop.