forked from dflook/terraform-github-actions
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathaction.yaml
More file actions
77 lines (68 loc) · 2.41 KB
/
action.yaml
File metadata and controls
77 lines (68 loc) · 2.41 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
name: tofu-destroy
description: Destroys all resources in an OpenTofu workspace
author: Daniel Flook
inputs:
path:
description: The path to the OpenTofu root module directory.
required: false
default: "."
workspace:
description: The name of the OpenTofu workspace to destroy.
required: false
default: "default"
variables:
description: |
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.
required: false
var_file:
description: |
List of tfvars files to use, one per line.
Paths should be relative to the GitHub Actions workspace
required: false
backend_config:
description: List of OpenTofu backend config values, one per line.
required: false
default: ""
backend_config_file:
description: |
List of OpenTofu backend config files to use, one per line.
Paths should be relative to the GitHub Actions workspace
required: false
default: ""
parallelism:
description: Limit the number of concurrent operations
required: false
default: "0"
outputs:
failure-reason:
description: |
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:
description: |
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": ""
}
```
runs:
env:
OPENTOFU: true
using: docker
image: ../image/Dockerfile
entrypoint: /entrypoints/destroy.sh
branding:
icon: globe
color: purple