One-off commands can be especially useful when you need immediate feedback on the state of your infrastructure without altering your main configuration processes.
Running One-Off Terraform Commands
To execute a single Terraform command:-
Navigate to the Tasks Section:
In the Spacelift dashboard, locate and click on the Tasks section. This is where you can input and run one-off commands. -
Execute Your Command:
Once you enter your desired Terraform command (for example,terraform state list) and click “Perform,” Spacelift will automatically spin up a container to handle the command execution. The resulting output is then displayed directly in the interface for your review. -
Review the Command Output:
The output provides real-time information about the current state of your infrastructure. For instance, runningterraform state listmight show entries for both an AWS instance and an AWS VPC, enabling you to quickly diagnose or verify the state of your deployments.
This facility not only helps in troubleshooting but also assists in gathering real-time state information without impacting your ongoing infrastructure operations.