Comment on page
Name: give your webhook a descriptive such as "Sleuth deploy registration"
Webhook URL: this URL should be the Sleuth registration URL for your code deployment. You can easily find this information via the link "Get setup instructions" in your code deployment dashboard.
You must include your
environmentin the parameters of your registration URL. Since Terraform Cloud controls the contents of the webhook you can only tell Sleuth about these parameters by including them in the URL.
Your URL will look something like: https://app.sleuth.io/api/1/deployments/sleuth/terraform/register_deploy?api_key=456ee3322eeedoow&environment=Staging
Triggers: Sleuth only respects the Completed trigger. You can send the others but they'll be ignored
Save the webhook and now every time your Terraform plan completes it will automatically register the repositories latest change with Sleuth.
Terraform Cloud doesn't provide the commit SHA that it has applied in the webhook payload. As a result we are unable to determine exactly what change was applied. As a result a limitation of this integration is that Sleuth will register the last known change from your code repository as the deploy that was applied. This works well if you are applying every change you make or if you have setup your code deployment as a mono-repo. However, if you merge many changes and apply older changes after newer ones have been introduced into your branch your Sleuth deploys will be incorrect. In this case we suggest you use our Webhooks to register your changes once they've been made.