opsgenie / terraform-provider-opsgenie

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

Cannot create api integrations with unique fields #333

Open robertsa1-els opened 2 years ago

robertsa1-els commented 2 years ago

Terraform Version

1.3.0

Affected Resource(s)

Please list the resources as a list, for example:

Terraform Configuration Files

resource "opsgenie_api_integration" "SNS_Outgoing_Integration" {
  name                                                 = "My-Amazon-SNS-Outgoing-Integration"
  type                                                   = "AmazonSnsOutgoing"
  owner_team_id                                = data.opsgenie_team.opsgenie_team.id
  ignore_responders_from_payload = true
}

Debug Output

Error: Error occurred with Status code: 422, Message: Property [topicArn] cannot be empty., Took: 0.052000, RequestId: <SNIP>

Expected Behavior

Integrations such as AmazonSnsOutgoing require unique fields to be provided to setup the integration i.e topicArn and region in this case.
There is no way to pass these variables to the Terraform resource.

The provider needs to provide a map to be able to pass in these arbitrary fields like the headers argument for webhooks

Actual Behavior

Resource blows up

Steps to Reproduce

Please list the steps required to reproduce the issue, for example: Try and create an AmazonSnsOutgoing or Flock or probably number of other integrations

Important Factoids

Are there anything atypical about your accounts that we should know? For example: Running in EC2 Classic? Custom version of OpenStack? Tight ACLs?

References

Are there any other GitHub issues (open or closed) or Pull Requests that should be linked here? For example: