Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Cache the Terraform instance state returned from schema.Resource.Apply
in external-client's Create even if the returned diagnostics contain errors. - In most cases, the Terraform plugin SDK's create implementation for a resource comprises multiple steps (with the creation of the external resource being the very first step). In case, the creation succeeds but any of the subsequent steps fail, then upjet's TF plugin SDK-based external client will not record this state losing the only opportunity to associate the MR with the newly provisioned external resource in some cases. We now put this initial state into the upjet's in-memory state cache so that it's now available for the external- client's next observe call. Signed-off-by: Alper Rifat Ulucinar <[email protected]>
- Loading branch information