terraform-provider-opsgenie
terraform-provider-opsgenie copied to clipboard
Alert policy order
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.
Any chance this could be reviewed ?
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 :)
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 ?
@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.