Terraform · Arazzo Workflow
Terraform Destroy Infrastructure and Delete the Workspace
Version 1.0.0
Queue a destroy run, apply it, then delete the emptied workspace.
View Spec
View on GitHub
Infrastructure As CodeCloud InfrastructureDevOpsOpen SourceHashiCorpArazzoWorkflows
Provider
Workflows
destroy-workspace
Destroy a workspace's managed infrastructure and then remove the workspace.
Reads the workspace, queues a destroy run, applies the destroy plan once it is confirmable, waits for the apply to complete, and deletes the workspace.
1
readWorkspace
GetWorkspace
Read the workspace to confirm it exists and is unlocked before queueing a destructive run against it.
2
createDestroyRun
CreateRun
Queue a destroy run against the workspace. The run plans the removal of every resource the workspace manages but does not apply it yet.
3
pollDestroyPlan
GetRun
Poll the destroy run until its plan settles, repeating while it is still pending, fetching, or planning.
4
applyDestroy
ApplyRun
Confirm and apply the destroy plan, tearing down the infrastructure the workspace manages.
5
pollDestroyApply
GetRun
Poll the run until the destroy apply reaches a terminal state, so the workspace is only deleted after its resources are actually gone.
6
deleteWorkspace
DeleteWorkspace
Delete the workspace now that its managed infrastructure has been destroyed and the apply reported success.