File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11package state
22
33import (
4+ "fmt"
45 "reflect"
56
67 "github.com/hashicorp/terraform/terraform"
@@ -189,3 +190,24 @@ const (
189190 // (Push/Pull)
190191 CacheRefreshConflict
191192)
193+
194+ func (sc CacheRefreshResult ) String () string {
195+ switch sc {
196+ case CacheRefreshNoop :
197+ return "Local and remote state in sync"
198+ case CacheRefreshInit :
199+ return "Local state initialized"
200+ case CacheRefreshUpdateLocal :
201+ return "Local state updated"
202+ case CacheRefreshUpdateRemote :
203+ return "Remote state updated"
204+ case CacheRefreshLocalNewer :
205+ return "Local state is newer than remote state, push required"
206+ case CacheRefreshRemoteNewer :
207+ return "Remote state is newer than local state, pull required"
208+ case CacheRefreshConflict :
209+ return "Local and remote state conflict, manual resolution required"
210+ default :
211+ return fmt .Sprintf ("Unknown state change type: %d" , sc )
212+ }
213+ }
You can’t perform that action at this time.
0 commit comments