opsgenie / terraform-provider-opsgenie

Terraform OpsGenie provider
https://registry.terraform.io/providers/opsgenie/opsgenie/latest/docs
Mozilla Public License 2.0
100 stars 136 forks source link

Alert policy order #388

Open gdlx opened 1 year ago

gdlx commented 1 year ago

This is an attempt to fix #223

It works perfectly if all policies are managed through this resource but mixing it with policies ordered throught the UI may lead to unpredictable behavior.

I tried some workarounds to add other policies order in the state to avoid systeamtic diff but I finally filtered the policies returned by the API to only handle those being managed by the resource. Other policies are just "ignored", and relative order between managed policies seems to be always correct.

I gave more info on API constraints in #223 discussion.

gdlx commented 1 year ago

Any chance this could be reviewed ?

koushik-swaminathan commented 11 months ago

Hi @gdlx, I recently release a new version v0.6.30 fixing this issue. Could you try out the this release and get back to me? Apologies for the time taken :)

gdlx commented 10 months ago

Hi @koushik-swaminathan, I just tried the change in 0.6.30 (sorry for the delay), but it wasn't the same issue (note #223 wasn't listed in #390 list of fixed issues).

Can you please re-open my PR or should I open a new one ?

gdlx commented 10 months ago

@koushik-swaminathan I've just rebased the PR.

I'm open to any other solution to handle policies order but the lack of this feature is a real blocker for me to use this provider, as I'm using dozen of policies, some of them being strongly order dependant.