terraform: make sure our serial is always higher

This commit is contained in:
Mitchell Hashimoto 2015-03-25 15:40:53 -07:00
parent f68f285f72
commit 9c6e2cdc21
1 changed files with 4 additions and 0 deletions

View File

@ -224,6 +224,10 @@ func (s *State) IncrementSerialMaybe(other *State) {
return
}
if !s.Equal(other) {
if other.Serial > s.Serial {
s.Serial = other.Serial
}
s.Serial++
}
}