Permissions to run a one time tasksAd hoc tasks allow you to run any command on the deployment container, so by default only organization administrators may run these tasks. You can use custom roles to grant this permission to other users.
Executing a Run Task

Run a Task.It will prompt you to enter the commands you desire to execute.
Enter the commands, as you would in a bash script. Separate commands with new lines.
When you are ready to run your task - click the
RUN A TASK button below.

During the task execution, all the variables that are defined in the environment will be available for you to use. Tasks also support custom flows. You can read more about the available hooks here.
Common Tasks
- Migrate state:
terraform init -migrate-state -force-copyorecho "yes" | terraform init -migrate-state - Unlock state:
terraform force-unlock -force LOCK_ID [DIR] - Retrieve output:
terraform output [options] [NAME] - Taint a resource
terraform taint [options] <address> - Move state:
terraform state mv [options] SOURCE DESTINATION
The tools available for executing commands are the same ones that were available during your last deployment.
If you require additional tools, make sure to update the ENV0_INSTALLED_TOOLS variable and run the deployment again.
Task Comments
You can add a comment, to let your teammates know why the task was run.Add a comment, by filling in the “Comment” input down below the
bash input.

Markdown syntax is supported.

Markdown SupportThe comment supports Markdown, so you would be able to generate even more context.