consul-terraform-sync icon indicating copy to clipboard operation
consul-terraform-sync copied to clipboard

Daisy chain execution of CTS Tasks into a workflow

Open devarshishah3 opened this issue 3 years ago • 0 comments

Description

Provide a mechanism in CTS to daisy chain tasks to be executed in the order defined by the user, guaranteeing the same value of service construct across the tasks in that workflow. CTS should also be able to pass the output of a Task as an input to a downstream Task. Downstream tasks in a workflow should not execute if an upstream task in the workflow fails.

Use Cases

This capability will allow the user to build comprehensive workflows without the need to have complex logic in CTS in a single Terraform module. e.g: For a load balancer, a user can create a workflow of task where a VIP is created first on service registration and then the load balancing pool members are added.

Alternative Solutions

A user can create comprehensive workflows by building complex Terraform module for a CTS task by adding buffer periods in CTS for task execution and relying on "depends_on" in a Terraform module. The problem with this alternative is that the user will have to create complex Terraform modules which could fail.

devarshishah3 avatar Jun 28 '21 23:06 devarshishah3