Configure Opsgenie to Jira Automation rules with Terraform
Asked by Azunna.Ikonne:

Hi All, I am trying to create an Opsgenie -\> Jira integration via terraform and i was wondering if it is possible to configure these automation rules with terraform as it's shown on the console. I have checked the terraform documentation but i can't seem to find anything that covers this.

![Screenshot 2021-10-28 at 10.58.52.png](https://community.atlassian.com/t5/image/serverpage/image-id/166945i5D005A40790CAE2D/image-size/large?v=v2&px=999 "Screenshot 2021-10-28 at 10.58.52.png")


Answers:
author: Justin Sitarz
body: Hi Azunna,

Justin here, from Opsgenie support - happy to help!

At the moment, it's not possible to configure these outbound integration actions through Terraform. However, I have raised up a feature request with our engineering team to expand the functionality of our provider to allow for this - hopefully it's something we can add in the future! For reference, that feature request ID is: OGS-4321. If you ever would like an update on that request status, please do feel free to reach out to us in support.

Please let me know if you have any other questions - thanks!

Justin S.

Atlassian Cloud Support

comments: author: Azunna.Ikonne
body: Thanks a lot! Will be looking forward to it.


author: Justin Sitarz
body: Hi Azumma,

Me too! Hoping it's something we can add in the near future :)

In the meantime, is there anything else I can help with?

Best,

Justin S.

Atlassian Cloud Support


author: Azunna.Ikonne
body: In addition to the request above,

1. It would be nice to also have support for the jira integration action filters on terraform.

2. When i try to register a webhook on jira via the api, it never takes my jqlfilters. It only returns an empty value for "issue-related-events-section".

See: <https://community.developer.atlassian.com/t/creating-jira-webhooks-jqlfilter-not-working-as-expected/38437/3>

It's the same error i am experiencing.


author: Justin Sitarz
body: Hi Azunna!

For item one - are you referring to the outbound alert filter (which determines which alerts are sent to Jira):

![Screen Shot 2021-11-05 at 8.11.32 AM.png](https://community.atlassian.com/t5/image/serverpage/image-id/168124i1C0FDCA02EDEA9AF/image-size/large?v=v2&px=999 "Screen Shot 2021-11-05 at 8.11.32 AM.png")

Or the filters for inbound requests, to trigger alert actions (i.e. Create, Ack, Close, etc.):

![Screen Shot 2021-11-05 at 8.11.47 AM.png](https://community.atlassian.com/t5/image/serverpage/image-id/168125iAC42E72EF91B1EBF/image-size/large?v=v2&px=999 "Screen Shot 2021-11-05 at 8.11.47 AM.png")

For item two - I do see this bug ticket that deals with some possibly incorrect information in our webhook API documentation:

<https://jira.atlassian.com/browse/JRACLOUD-67911>

Though I have not tested and confirmed - it may be worthwhile to reach out to Jira support directly to get their input on the matter.

But, let me know about the first questions, and I can either let you know if it's possible with Terraform, or I can add it to our existing feature request.

Thanks!

Justin S.

Atlassian Cloud Support


author: Azunna.Ikonne
body: Hi Justin,

Yes for item one i am referring to the options to send alert updates back to jira and to also create issues for Opsgenie alerts.

![Screenshot 2021-11-05 at 14.32.16.png](https://community.atlassian.com/t5/image/serverpage/image-id/168136iFD08A7CB7E1F62F3/image-size/large?v=v2&px=999 "Screenshot 2021-11-05 at 14.32.16.png")

In addition to that, i noticed that the Opsgenie alert filter field types are only supported for API and Email Integrations which means you have to manually configure filters for other integration types, so it would be nice to have that for other integration types. It would also be great to be able to have terraform support for it as well.  

On the jira issue, i have tested what you shared and it works. Seems like the documentation needs to be corrected.

Thank you.


author: Justin Sitarz
body: Hi Azunna,

Ah, yes - it would be nice to support configuring those through Terraform - I agree! This request is covered in the feature suggestion I submitted earlier this week (OGS-4321). Hopefully it's something we can add in the future!

As for the second item - glad that worked! I'll let the Jira team know that they need to update their documentation, as well.

Is there anything else I can help with at the moment?

Best,

Justin S.

Atlassian Cloud Support


author: Azunna.Ikonne
body: Nothing else, thank you.


author: Justin Sitarz
body: Azunna,

Awesome! If you ever need anything else, please don't hesitate to ask here, or to reach out to us via the in-app chat in Opsgenie. Have a good one!

Justin S.

Atlassian Cloud Support


Tags: cloud

jira