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

newrelic_notification_destination Resource: Alert destinations are created multiple times, possibly due to retries #2678

Open
atkinchris opened this issue May 29, 2024 · 2 comments

Comments

@atkinchris
Copy link
Contributor

When applying Terraform to create Alert destinations, they are created multiple times.

$ terraform -v

Terraform v1.8.4
on darwin_arm64
+ provider registry.terraform.io/newrelic/newrelic v3.36.0
resource "newrelic_notification_destination" "service_now_prod" {
  name = "Service Now - Official Destination"
  type = "SERVICE_NOW"

  account_id = <REDACTED>

  property {
    key   = "url"
    value = <REDACTED>
  }

  property {
    key   = "two_way_integration"
    value = "true"
  }

  auth_basic {
    user     = <REDACTED>
    password = <REDACTED>
  }
}

Actual behaviour

When applying Terraform to create Alert destinations, the destinations are created multiple times. This is consistent, even if no "retries" error is shown.

$ terraform apply

newrelic_notification_destination.service_now_pre_prod: Creating...
newrelic_notification_destination.service_now_prod: Creating...
newrelic_notification_destination.service_now_pre_prod: Creation complete after 8s [id=<REDACTED>]
newrelic_notification_destination.service_now_prod: Still creating... [10s elapsed]
newrelic_notification_destination.service_now_prod: Still creating... [20s elapsed]
newrelic_notification_destination.service_now_prod: Still creating... [30s elapsed]
newrelic_notification_destination.service_now_prod: Still creating... [40s elapsed]
╷
│ Error: maximum retries reached: An error occurred resolving this field
│
│   with newrelic_notification_destination.service_now_prod,
│   on service_now.tf line 16, in resource "newrelic_notification_destination" "service_now_prod":
│   16: resource "newrelic_notification_destination" "service_now_prod" {
│
│ NOTICE: fields are statically typed. Make sure all fields are of the correct type
Screenshot 2024-05-29 at 11 17 05

Expected behaviour

Each resource is created exactly once, deterministically.

@atkinchris
Copy link
Contributor Author

I have a suspicion this is coming from New Relic attempting to verify the passed Service Now credentials, timing out silently - and causing a retry.

@pranav-new-relic
Copy link
Member

pranav-new-relic commented May 30, 2024

Thank you for reporting this, @atkinchris, this sounds like a bug which needs to be investigated into, further.
The team shall be triaging this issue soon, based on the current priority queue; and shall reach out to you for more information, if needed :)

cc @amaor-newrelic

@pranav-new-relic pranav-new-relic changed the title Alert destinations are created multiple times, possibly due to retries newrelic_notification_destination Resource: Alert destinations are created multiple times, possibly due to retries May 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants