Closed binlab closed 3 years ago
Thanks for the idea @binlab, but I don't think that can work because of the data the provider needs to know in order to manage the object properly. In your case, it sounds like an empty BODY is provided - which means there's no way to learn what the created ID of the object is (unless you set the object_id
on the resource manually... maybe that's possible?). Without knowing the ID of the object, the next run will not know what to manage in the API.
I guess it's possible to do what you describe if you know what the object ID will be when it's created, but in that case, maybe this provider is overkill for the use case?
If that doesn't make sense, please feel free to reopen the issue and share some more details of the API and how it's day 2 lifecycle works - we might be able to cook up a recipe!
Currently, parameters
write_returns_object
andcreate_returns_object
can be configured just globally in the provider section, but I stuck with some problem when some of the REST API (Okta API) endpoint response code was204
and empty BODY, no JSON. So I got an error:But in fact, a resource created successfully
Of course, a workaround was just to set
write_returns_object=false
andcreate_returns_object=false
but for other resources need to return a response by PUT or POST actionsAdditionally, this gave me the idea that it would be nice to also allow an empty BODY
@DRuggeri what do you think?