diff options
Diffstat (limited to 'vendor/github.com/hashicorp/terraform/state/remote/state.go')
-rw-r--r-- | vendor/github.com/hashicorp/terraform/state/remote/state.go | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/vendor/github.com/hashicorp/terraform/state/remote/state.go b/vendor/github.com/hashicorp/terraform/state/remote/state.go index 8e157101..575e4d18 100644 --- a/vendor/github.com/hashicorp/terraform/state/remote/state.go +++ b/vendor/github.com/hashicorp/terraform/state/remote/state.go @@ -2,7 +2,7 @@ package remote import ( "bytes" - "fmt" + "log" "sync" "github.com/hashicorp/terraform/state" @@ -35,7 +35,10 @@ func (s *State) WriteState(state *terraform.State) error { defer s.mu.Unlock() if s.readState != nil && !state.SameLineage(s.readState) { - return fmt.Errorf("incompatible state lineage; given %s but want %s", state.Lineage, s.readState.Lineage) + // This can't error here, because we need to be able to overwrite the + // state in some cases, like `state push -force` or `workspace new + // -state=` + log.Printf("[WARN] incompatible state lineage; given %s but want %s", state.Lineage, s.readState.Lineage) } // We create a deep copy of the state here, because the caller also has |