Run Tasks
HCP Terraform run tasks let you directly integrate third-party tools and services at certain stages in the HCP Terraform run lifecycle.
Each run task in a workspace sends run data to an external service at a specific run stage. The external service processes the data and returns a passed or failed status to HCP Terraform. For example, you could add a run task that checks configuration for any security vulnerabilities before Terraform applies that plan.
Depending on the enforcement level, failed run tasks can stop runs and prevent Terraform from provisioning infrastructure. For example, a run fails if a mandatory task fails, even if an advisory task succeeds. If an advisory task fails, but a mandatory task succeeds, the run succeeds and proceeds to the apply stage, where it can provision infrastructure.
Finding Run Tasks in the Terraform Registry
Browse a list of all run tasks in the Terraform Registry or use keywords to search for run tasks relevant to your use cases.
Click a run task to view its documentation on our partner’s site.
Adding a Run Task to the Terraform Registry
Adding a run task to the Terraform registry makes your run task available for other consumers and HashiCorp partners.
To add your run task to the Terraform registry:
Complete the Technology Program Application.
Sign our Technology Partner Agreement to become a HashiCorp technology partner. HashiCorp sends you the agreement after you complete Technology Program Application.
Build and test your run task. This process requires choosing which stages of the Terraform run cycle you want your run task to support. For example, you may want to let users configure your run task to execute either before or after HCP Terraform completes the plan. We also recommend thoroughly testing your run task in both passing and failing scenarios. Refer to Run Tasks Stages and Results for more information.
Provide a functional demonstration to a member of the HashiCorp Technology Alliances team.
Create a publicly available documentation set for your run task with that includes the following details:
- How to create a run task
- How to attach the run task to a workspace
- Which stages the run task supports
- A showcase of the run task blocking and passing the build, preferably using screenshots
Once you complete all the requirements, the Technology Alliances team adds your run task to the Terraform Registry with a link to your public documentation set.