|
|
|
|
|
by felixhuttmann
1666 days ago
|
|
If terraform crashes during apply, it leaves behind an inconsistent state by design: The lock is still set, and some resources which were created already are not yet in the statefile. Trying to re-run terraform after a crash during apply will generally lead to an error: Even if the lock is removed, resources may still conflict if they already exist. In contrast, when a kubernetes controller or operator crashes, it can be expected to continue seamlessly where it left off. It is easier to write kubernetes controllers that are able to continue seamlessly then to write terraform providers that do so, because of the granularity of the persistence of the state machine. Terraform locks the remote state, then applies all resources in the current root module, then unlocks the remote state again. In contrast, kubernetes operators can granularly update individual objects after each API call that is performed. |
|
Source: was a core developer of Terraform and some of the largest providers for many years.