Open zeffron opened 2 years ago
Hi @zeffron, thanks for raising the issue. We will prioritise the issue.
Hi @zeffron, It is a known issue and the API team are currently working on it.
Is there an ETA for when this will be resolved? We're now encountering this issue when using only public location. The Terraform provider should not be relying on a fix from the API. It should be able to gracefully handle API errors.
There's not much we can do on the Terraform side if the API is broken.
Disagree. I included an explanation of what Terraform can do to work around this in my original description:
It should check if the monitor creation was actually successful and if so, populate the resource into the state file.
The error is specific enough to allow for this, as it's a timeout error returned by the API, not an HTTP or TCP timeout.
@zeffron The API team has taken this up and is implementing a solution. The problem also existed in the UI and we generally don't like working around API issues on the Terraform side.
There's a fix out in production. Can someone try to reproduce?
I continue to reproduce the issue with 100% reliability. Even after upgrading to 3.4.4 of the provider just in case.
Thanks @zeffron
Version 3.8.0 still has this issue.
Hi, We recently had some improvements wrt. Synthetics, could someone please try to re-verify with the latest version (3.20.1) and confirm it's working as expected ?
I still see this issue with (3.20.1)
Hi, Thanks for confirming, we're checking with the API team to investigate further and this will be addressed based on the priority. Thank you !
Still seeing this issue with newrelic/newrelic v3.27.1. Is there any workaround for this issue?
hi we are still investigating this issue
v3.40.0 Looks good. The error appears only when I create the monitor with an empty tag key and values parameters:
tag { key = "" values = [] }
Hi there,
Thank you for opening an issue. In order to better assist you with your issue, we kindly ask to follow the template format and instructions. Please note that we try to keep the Terraform issue tracker reserved for bug reports and feature requests only. General usage questions submitted as issues will be closed and redirected to New Relic's Explorers Hub https://discuss.newrelic.com/c/build-on-new-relic/developer-toolkit.
Please include the following with your bug report
provider
configuration (sensitive details redacted)Terraform Version
Run
terraform -v
to show the version. If you are not running the latest version of Terraform, please upgrade because your issue may have already been fixed.Yes, it's an outdated version of Terraform, but no, upgrading won't fix the issue. The issue is with how the provider handles a certain type of error returned from the NerdGraph API.
Affected Resource(s)
Please list the resources as a list, for example:
newrelic_synthetics_script_monitor
If this issue appears to affect multiple resources, it may be an issue with Terraform's core, so please mention this.
Terraform Configuration
Unfortunately, I cannot provide an example HCL configuration, but the gist of one would look like
Actual Behavior
The
newrelic_synthetics_script_monitor.appliance
resource fails Terraform with anError: BAD_REQUEST: Monitor name already exists.
. This is the case even when a monitor with the name absolutely did not exist prior to running Terraform. Additionally, the monitor does successfully create.The first call to create the monitor returns
even though the monitor is created.
The provider then tries to create monitor again, and gets a conflict.
Expected Behavior
Terraform should not have failed, because the monitor was created. Instead, upon receiving this timeout error, it should check if the monitor creation was actually successful and if so, populate the resource into the state file.
Steps to Reproduce
Please list the steps required to reproduce the issue, for example:
Debug Output
Please see the above snippet from a Terraform trace log.