Last updated on February 4th, 2023 at 3:04pm
The HashiCorp team released Run Tasks as a beta feature for Terraform Cloud to allow organizations to add in additional steps between the plan and apply stages of a Terraform job. We were excited to work with their team during the beta to show how we could integrate cloudtamer.io into the process to show information about the environment before the Terraform resources kicked off.
Run Tasks reaches out to partner solutions using a webhook to notify when a job is running and then provides APIs that the solution can reach in a callback to provide a clickable URL, status (passed or failed), as well as a message that is displayed back to the user.
For our integration, we wanted to provide two event hooks that our customers could utilize in their jobs. The first integrates with our Savings Opportunities, which shows the monthly forecast on a project as well as the available cost savings opportunities. This is helpful if you want to see the monthly forecast before the resources are created. If you have the Team & Governance package, you can also enable Cost Estimation to see the estimated cost of the resources. This allows you to see the impact of the resources on your current environment.
The second hook integrates with Compliance, and shows the number of compliance findings on a project, throwing an error if there are any critical findings. Terraform Cloud allows you to select enforcement levels of either advisory (failed tasks show as informational) or mandatory (failed tasks prevent Terraform from continuing) so you can select either when setting up the hooks. This is helpful if you want to prevent creating resources unless the environment is secure.
Below is an example of the integration in Terraform Cloud.