To create an ephemeral cluster, add a Delete Cluster task.
The Delete Cluster task terminates the cluster and deletes the cluster and other resources that the cluster workflow creates.
If you do not add a Delete Cluster task, the cluster that the workflow creates remains running when the workflow ends. You can delete the cluster at any time.
Drag a Delete Cluster task to the workflow editor.
In the General properties, optionally rename the Delete Cluster task.
Connect the final task in the workflow to the Delete Cluster task, and connect the Delete Cluster task to the workflow End_Event.