github.com/magodo/terraform@v0.11.12-beta1/config/provisioner_enums.go (about) 1 package config 2 3 // ProvisionerWhen is an enum for valid values for when to run provisioners. 4 type ProvisionerWhen int 5 6 const ( 7 ProvisionerWhenInvalid ProvisionerWhen = iota 8 ProvisionerWhenCreate 9 ProvisionerWhenDestroy 10 ) 11 12 var provisionerWhenStrs = map[ProvisionerWhen]string{ 13 ProvisionerWhenInvalid: "invalid", 14 ProvisionerWhenCreate: "create", 15 ProvisionerWhenDestroy: "destroy", 16 } 17 18 func (v ProvisionerWhen) String() string { 19 return provisionerWhenStrs[v] 20 } 21 22 // ProvisionerOnFailure is an enum for valid values for on_failure options 23 // for provisioners. 24 type ProvisionerOnFailure int 25 26 const ( 27 ProvisionerOnFailureInvalid ProvisionerOnFailure = iota 28 ProvisionerOnFailureContinue 29 ProvisionerOnFailureFail 30 ) 31 32 var provisionerOnFailureStrs = map[ProvisionerOnFailure]string{ 33 ProvisionerOnFailureInvalid: "invalid", 34 ProvisionerOnFailureContinue: "continue", 35 ProvisionerOnFailureFail: "fail", 36 } 37 38 func (v ProvisionerOnFailure) String() string { 39 return provisionerOnFailureStrs[v] 40 }