I’m developing a provider for internal use at a client, and got to a tricky moment now. I couldn’t find docs/examples on how it should be, so if there’s something out there already, please point me to it!
The API has several endpoints for lots of resources, and thankfully has a swagger file (albeit with some errors), but only GET/PUT/POST verbs. All the delete options in the UI actually point to a PUT action to disable the resource. Creating that kind of behaviour in the Delete option for the resource is not a big deal, but I’d like to understand if there’s a “best” way to deal with this.
Should it be in the Delete procedure as usual and remove the resource from the state, even though the object will remain existing at the service? Or should it fail, making the user keep the resource in the HCL/state and changing it to inactive, effectively updating the resource and its state?