dakota-marshall / go-icinga2-api

An icinga2 api wrapper written in Go
Mozilla Public License 2.0
1 stars 0 forks source link

Question: change provider logic #7

Open legioner0 opened 2 months ago

legioner0 commented 2 months ago

Is it possible to change provider behavior from force replacement (via "delete&create") to update? There is an old issue in provider repo (https://github.com/Icinga/terraform-provider-icinga2/issues/46) with no answers. I have similar problems - updating host/service vars leads to recreation of this object, that leads to problem with business process plugin and so on.

dakota-marshall commented 1 month ago

I think this should be possible for most of the endpoints. We would need to implement an Update* method for each endpoint that just sends a POST request. That should update the object without recreation, allowing for the provider to implement proper updates as well. (provided they would have to still switch the upstream to this fork, which I haven't pitched over there quite yet)

I have some more time to look at this project this week so I will try and see if I can get some of the more common ones implemented.