Skip to content

Applying multiple sentry_integration_opsgenie resources in the same operation results in error #679

@kpocius

Description

@kpocius

Say I have a setup like this:

data "sentry_organization_integration" "opsgenie" {
  organization = "my-organization"
  provider_key = "opsgenie"
  name         = "my-opsgenie-organization"
}

resource "sentry_integration_opsgenie" "team1" {
  organization    = "my-organization"
  integration_id  = data.sentry_organization_integration.opsgenie.id
  team            = "my-opsgenie-team-1"
  integration_key = "team1-integration-key"
}

resource "sentry_integration_opsgenie" "team2" {
  organization    = "my-organization"
  integration_id  = data.sentry_organization_integration.opsgenie.id
  team            = "my-opsgenie-team-2"
  integration_key = "team2-integration-key"
}

Upon apply one of the resources will get created, while another will error out with something similar to:

Error: Client error
Unable to read, got error: team table item not found: 224478

Where 224478 is the correct integration ID. The issue is that the error persists from there on, until I remove the offending resource from the state. If I comment all sentry_integration_opsgenie resources but one, and just keep adding them one-by-one, it works as expected, but is tedious, and I need to make sure no one else accidentally tries to add more than one resource.

Setting parallelism to 1 is not an option because I manage a lot of sentry resources and it would make the pipeline run forever.

Terraform version 1.7.5
Provider version 0.14.6

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions