dflook/tofu-destroy
Destroys all resources in an OpenTofu workspace
View on GitHubTrust Signals
- Scorecard Score
- not yet scored
- Maintenance Recency
- Maintainedlast commit Jan 13, 2026
- License
- None
Pinned Snippet
uses: dflook/tofu-destroy@50ea717235f8c82f9cf631026cfcf254669ea539 # v2.2.3tags can be moved; commit SHAs can't. why a SHA?
Inputs
| name | description | required | default |
|---|---|---|---|
| path | The path to the OpenTofu root module directory. | no | . |
| workspace | The name of the OpenTofu workspace to destroy. | no | default |
| variables | Variables to set for the tofu destroy. This should be valid OpenTofu syntax - like a [variable definition file](https://opentofu.org/docs/language/values/variables/#variable-definitions-tfvars-files). Variables set here override any given in `var_file`s. | no | — |
| var_file | List of tfvars files to use, one per line. Paths should be relative to the GitHub Actions workspace | no | — |
| backend_config | List of OpenTofu backend config values, one per line. | no | "" |
| backend_config_file | List of OpenTofu backend config files to use, one per line. Paths should be relative to the GitHub Actions workspace | no | "" |
| parallelism | Limit the number of concurrent operations | no | 0 |
Outputs
| name | description |
|---|---|
| failure_reason | When the job outcome is `failure`, this output may be set. The value may be one of: - `destroy-failed` - The OpenTofu destroy operation failed. - `state-locked` - The OpenTofu state lock could not be obtained because it was already locked. If the job fails for any other reason this will not be set. This can be used with the Actions expression syntax to conditionally run a steps. |
| failure-reason | When the job outcome is `failure`, this output may be set. The value may be one of: - `destroy-failed` - The OpenTofu destroy operation failed. - `state-locked` - The OpenTofu state lock could not be obtained because it was already locked. If the job fails for any other reason this will not be set. This can be used with the Actions expression syntax to conditionally run a steps. |
| lock_info | When the job outcome is `failure` and the failure_reason is `state-locked`, this output will be set. It is a json object containing any available state lock information and typically has the form: ```json { "ID": "838fbfde-c5cd-297f-84a4-d7578b4a4880", "Path": "terraform-github-actions/test-unlock-state", "Operation": "OperationTypeApply", "Who": "root@e9d43b0c6478", "Version": "1.3.7", "Created": "2023-01-28 00:16:41.560904373 +0000 UTC", "Info": "" } ``` |
| lock-info | When the job outcome is `failure` and the failure_reason is `state-locked`, this output will be set. It is a json object containing any available state lock information and typically has the form: ```json { "ID": "838fbfde-c5cd-297f-84a4-d7578b4a4880", "Path": "terraform-github-actions/test-unlock-state", "Operation": "OperationTypeApply", "Who": "root@e9d43b0c6478", "Version": "1.3.7", "Created": "2023-01-28 00:16:41.560904373 +0000 UTC", "Info": "" } ``` |