terraform-provider-opsgenie icon indicating copy to clipboard operation
terraform-provider-opsgenie copied to clipboard

Alert policy order

Open gdlx opened this issue 1 year ago • 4 comments

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 avatar Jun 30 '23 16:06 gdlx

Any chance this could be reviewed ?

gdlx avatar Aug 30 '23 09:08 gdlx

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 :)

koushik-swaminathan avatar Oct 09 '23 09:10 koushik-swaminathan

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).

  • #390 is about filters ordering inside each policy.
  • My PR was about the order in which policies are executed, which has a huge impact on their result.

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

gdlx avatar Nov 16 '23 11:11 gdlx

@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.

gdlx avatar Nov 16 '23 13:11 gdlx