Skip to content

Interactive Tasks

WIP

WIP

Define tasks in tasks.hcl:

resource "task" "setup_environment" {
title = "Set up your environment"
condition {
script = file("scripts/setup_environment/check.sh")
}
on_solve {
script = file("scripts/setup_environment/solve.sh")
}
}

Check scripts validate that tasks are completed correctly:

scripts/setup_environment/check.sh
#!/bin/bash
if [ -f "/tmp/setup_complete" ]; then
exit 0 # Success
else
echo "Setup not complete. Please run the setup command."
exit 1 # Failure
fi

WIP