Skip to main content

I am attempting to configure the Jira Cloud extension for a service. I am able to successfully configure the extension via the UI–i.e., I can set it up, create a test ticket, and even create a ticket from the drop-down in an incident.


Configuring this extension via the UI works great, but it doesn’t scale for 100+ services. Therefore, I want to configure the extension across all the services via Terraform.


The trouble is that I cannot seem to get it to work.


I’ve created a “pagerduty_extension” object in terraform and associated it with the Jira Cloud schema and a services. And I added a “jira” config block. After applying the Terraform, the extension shows up in the Jira extensions list, and looks correct (all the fields that I’d expect to be poplulated are populated, and it appears green). And when I create a test issue it is successful.


When I attempt to create a Jira issue from an incident against the given service, I get the error message “Unable to create a Jira ticket at this time. For more detailed information, try pressing the “Create Test Issue” button in the Jira Configuration page.” But, of course, creating a test issue is always successful…So…I’m stumped.


In an attempt to be sure I’m constructing the pagerduty_extension config block correctly, I have retrieved via the PagerDuty API the config block of a Jira Cloud extension that I configured via the UI. From what I can see, I have provided all the required info. (Although there are no examples of such config blocks anywhere on the internet.)


I hesitate to paste the Terraform code here, as it is rather long, and it contains identifying data…So…


Perhaps someone has seen this situation before and can provide some guidance? Maybe someone has specific guidance on constructing a Jira Cloud extension config block in Terraform? Or–failing all else–can anyone point me to something within PagerDuty or Jira Cloud that can provide me with add’l troubleshooting information?


Thank you in advance!

I used the same solution as you’ve mentioned and it’s been working fine since August 2024.


Just recently when adding new environments, all of the pager duty objects are created except for an entry on the Jira Configuration page; I now have to create this manually.

I took the webhook ID from a manually created configuration and compared the JSON output, it has changed since August 2024. Using the new JSON output in my Terraform code does not resolve the issue.

I am using the following schema in my Terraform code: https://api.eu.pagerduty.com/extension_schemas/PK0OW6S and Terraform provider: 2.14.4, I’ve also tried 3.22.0; no joy.

If you have discovered any “dark magic” than may undo this curse I’d appreciate any advice that you can give.

 


Hi ​@Andy Davis is this case, instead of setting up a PD Extension for Jira Cloud, I’d suggest you better opt for using the Terraform resource pagerduty_jira_cloud_account_mapping_rule to setup the mapping rule to sync incident data between Jira Cloud and PagerDuty regarding the target PD Service, more on the Jira Cloud+PD integration here.


Hi ​@José Antonio Reyes ,

I got tired of waiting for PD support and employed the pagerduty_jira_cloud_account_mapping_rule as you suggested.

Getting the configuration was easier than anticipated, I just created a single null terraform resource for “pagerduty_jira_cloud_account_mapping_rule.create_ticket” and imported it using:
terraform import pagerduty_jira_cloud_account_mapping_rule.create_ticket account_id:config_id

I was then able to copy the JSON from the terraform state, tweak it and paste it into my module and Jira configurations are being created again.

Thank you for your assistance.

 


Reply