forked from hashicorp/terraform
-
Notifications
You must be signed in to change notification settings - Fork 0
/
provisioner_enums.go
40 lines (32 loc) · 993 Bytes
/
provisioner_enums.go
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
package config
// ProvisionerWhen is an enum for valid values for when to run provisioners.
type ProvisionerWhen int
const (
ProvisionerWhenInvalid ProvisionerWhen = iota
ProvisionerWhenCreate
ProvisionerWhenDestroy
)
var provisionerWhenStrs = map[ProvisionerWhen]string{
ProvisionerWhenInvalid: "invalid",
ProvisionerWhenCreate: "create",
ProvisionerWhenDestroy: "destroy",
}
func (v ProvisionerWhen) String() string {
return provisionerWhenStrs[v]
}
// ProvisionerOnFailure is an enum for valid values for on_failure options
// for provisioners.
type ProvisionerOnFailure int
const (
ProvisionerOnFailureInvalid ProvisionerOnFailure = iota
ProvisionerOnFailureContinue
ProvisionerOnFailureFail
)
var provisionerOnFailureStrs = map[ProvisionerOnFailure]string{
ProvisionerOnFailureInvalid: "invalid",
ProvisionerOnFailureContinue: "continue",
ProvisionerOnFailureFail: "fail",
}
func (v ProvisionerOnFailure) String() string {
return provisionerOnFailureStrs[v]
}