opsgenie / terraform-provider-opsgenie

Terraform OpsGenie provider
https://registry.terraform.io/providers/opsgenie/opsgenie/latest/docs
Mozilla Public License 2.0
100 stars 135 forks source link

opsgenie_email_integration resource doesn't work on the Essentials plan #443

Closed kostyantyn closed 1 month ago

kostyantyn commented 1 month ago

Hi,

After importing the email integration resource (per team) and trying to update its properties, the provider returns an error:

Message: Account plan does not have the right to use global integrations

however the opsgenie_email_integration resource is configured to use owner_team_id and so it's not a global integration but team specific.

Terraform Version

Terraform v1.5.7

Affected Resource(s)

Terraform Configuration Files

resource "opsgenie_team" "tech" {
  name        = "Tech"
  description = "Tech"
}

resource "opsgenie_email_integration" "tech" {
  owner_team_id  = opsgenie_team.tech.id
  name           = "Tech"
  email_username = "Tech"
}

Expected Behavior

Be able to manage email integration per team (not global) on Essentials plan

Actual Behavior

Error: Error occurred with Status code: 422, Message: Account plan does not have the right to use global integrations., Took: 0.081000, RequestId: e9552aa4-0988-4e08-936c-1f9a3bf307da
kostyantyn commented 1 month ago

It doesn't allow to manage the resource after importing, e..g:

terraform import opsgenie_email_integration.tech accd03ce-f2b4-478f-996a-b6866a5faade

But does work when creating the resource from scratch. So closing the issue as there is a workaround