Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
job: prevent partial update on error (#412)
The default behaviour of the Terraform SDK is to copy the plan result into state which could result in partial state updates, where Terraform state is updated, but the actual resource state is not, in case of an error during the apply. This is normally not an issue because resources are expected to undo these changes on state refresh. Any partial update is reconciled with the actual resource state. But due to #1, the `nomad_job` resource is not able to properly reconcile on refresh, causing the partial update to prevent further applies unless the configuration is also changed. This commit uses the `d.Partial()` method to signal to Terraform that any state changes should be rolledback in case of an error.
- Loading branch information