Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: Error occurred with Status code: 422, Message: Integration with type 'jira-software-cloud' does not exist #442

Open
marcossv9 opened this issue Jul 15, 2024 · 1 comment

Comments

@marcossv9
Copy link

Hi there,

I'm trying to automate the creation of the jira cloud bidirectional integration with opsgenie using the terraform provider and couldn't find the right opsgenie api integration type for it.
This list only mention the Jira integration that references the legacy product and not Jira Cloud.
Clearly, the documentation is outdated and not reflecting the actual behavior of the opsgenie api, that seems to be using the jira-software-cloud value for integration type, but that doesn't work.

Terraform Version

Terraform v1.5.5
on linux_amd64

  • provider registry.terraform.io/datadog/datadog v3.37.0
  • provider registry.terraform.io/hashicorp/aws v5.20.1
  • provider registry.terraform.io/opsgenie/opsgenie v0.6.35

Affected Resource(s)

  • opsgenie_api_integration

Terraform Configuration Files

resource "opsgenie_api_integration" "jira-integration" {
  name     = "Jira Integration"
  type     = "jira-software-cloud"

  allow_write_access             = true
  enabled                        = true
  ignore_responders_from_payload = false
  suppress_notifications         = false
}

Debug Output

Terraform will perform the following actions:

  # opsgenie_api_integration.jira-integration will be created
  + resource "opsgenie_api_integration" "jira-integration" {
      + allow_write_access             = true
      + api_key                        = (sensitive value)
      + enabled                        = true
      + id                             = (known after apply)
      + ignore_responders_from_payload = false
      + name                           = "Jira Integration"
      + suppress_notifications         = false
      + type                           = "jira-software-cloud"
    }

Panic Output

│ Error: Error occurred with Status code: 422, Message: Integration with type 'jira-software-cloud' does not exist., Took: 0.001000, RequestId: 862839cd-3647-4f86-ac22-9f12f5eaa868
│ 
│   with opsgenie_api_integration.jira-integration,
│   on teams.tf line 38, in resource "opsgenie_api_integration" "jira-integration":
│   38: resource "opsgenie_api_integration" "jira-integration" {
│ 
╵
Releasing state lock. This may take a few moments...

Expected Behavior

the opsgenie api integration for jira cloud is created correctly.

Actual Behavior

an error mentioned above. it works fine when I use Jira as the type, but that creates an integration for the Legacy Jira app.

Steps to Reproduce

  1. terraform apply
@tparramonLM
Copy link

tparramonLM commented Aug 6, 2024

Hi there, I would like to provide additional details regarding these Jira integrations.

As far from now, we can add 2 different Jira API integrations under Opsgenie Integrations:

  • Jira
  • Jira Service Management
Add-Integration

Under the first option, "Jira" integration, we can select 2 different integration variants:

  • Jira (Legacy)
  • Jira
Jira

Likewise, under "Jira Service Management" integration, we can select 2 different integration variants:

  • Jira Service Management
  • Jira Service Management Cloud
Jira-Service-Management

Essentially, we have 4 different integration variants with the following type names :

Jira

  • Jira (Legacy)
{
    "id":"xxxxxxxx-xxxxxxxx-xxxxxxxx-xxxxxxxx",
    "name":"test-jira-legacy",
    "enabled":false,
    "type":"Jira",
    "teamId":"xxxxxxxx-xxxxxxxx-xxxxxxxx-xxxxxxxx",
    "version":"v2",
    "advanced":true
}
  • Jira
{
    "id":"xxxxxxxx-xxxxxxxx-xxxxxxxx-xxxxxxxx",
    "name":"jira-test",
    "enabled":false,
    "type":"jira-software-cloud",
    "teamId":"xxxxxxxx-xxxxxxxx-xxxxxxxx-xxxxxxxx",
    "version":"v3",
    "advanced":true
}

Jira Service Management

  • Jira Service Management
{
    "id":"xxxxxxxx-xxxxxxxx-xxxxxxxx-xxxxxxxx",
    "name":"test-jira-service-management",
    "enabled":false,
    "type":"JiraServiceDesk",
    "teamId":"xxxxxxxx-xxxxxxxx-xxxxxxxx-xxxxxxxx",
    "version":"v2",
    "advanced":true
}
  • Jira Service Management Cloud
{
    "id":"xxxxxxxx-xxxxxxxx-xxxxxxxx-xxxxxxxx",
    "name":"test-jira-service-management-cloud",
    "enabled":true,
    "type":"jira-service-management-cloud",
    "teamId":"xxxxxxxx-xxxxxxxx-xxxxxxxx-xxxxxxxx",
    "version":"v3",
    "advanced":true
}

According to the documentation available at https://support.atlassian.com/opsgenie/docs/integration-types-to-be-used-with-the-api/, only two distinct Jira integrations are supported, corresponding to the v2 version and not the v3.

Integration Name Link API TypeName
Atlassian Jira Integrate Opsgenie with Jira Jira
Atlassian Jira Service Management Integrate Opsgenie with Jira Service Management JiraServiceDesk

Summarizing:

  • "type":"Jira" --> Supported (v2) ✅
  • "type":"jira-software-cloud" --> NOT Supported (v3) 🔴
  • "type":"JiraServiceDesk" --> Supported (v2) ✅
  • "type":"jira-service-management-cloud" --> NOT Supported (v3) 🔴

Are there any plans or expectations regarding when we will be able to support the v3 integrations that are not currently supported?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants