terraform-provider-newrelic
terraform-provider-newrelic copied to clipboard
Race condition between deletion and creation of monitor
Hello team! I'm a New Relic employee, so please feel free to ping via Slack for a link to a tangible example of this bug.
Please include the following with your bug report
- [x] Your New Relic
provider
configuration - [x] A list of affected resources and/or data sources
- [x] The configuration of the resources and/or data sources related to the bug report (i.e. from the list mentioned above)
- [x] Description of the current behavior (the bug)
- [x] Description of the expected behavior
- [x] Any related log output
Terraform Version
- NR Provider:
2.39.0
- Terraform: v0.14.2
Affected Resource(s)
-
newrelic_synthetics_monitor
Terraform Configuration
- We have an internal repository - ping me on Slack for details/a link.
Actual Behavior
- On plan,
newrelic_synthetics_monitor
items are marked for deletion then recreation. - On apply, error message is received of form:
Error: 400 response returned: Invalid name specified: ‘FILLER TEXT HERE’; a monitor with that name already exists.
in resource "newrelic_synthetics_monitor" “filler_name_here”:
- Users can view the synthetics UI and observe asynchronous deletion of synthetics resources
Expected Behavior
- Either find an avenue to update the item instead of delete/create or adjust the delete/create of a same-named monitor to be synchronous
Steps to Reproduce
See Actual Behavior section.
Debug Output
- Ping via Slack for a link to a relevant PR which had this issue.
Thanks for the report @aeliaNR
With the current REST API we can't do an update, but there's a new GraphQL API coming soon (end of April). I'm currently hesitant to spend time on the REST API implementation as it's going away.
Is this a blocker for you? If you run Terraform again does it work?
Understood. This is not an urgent blocker as we've learned to just re-run the plan/apply until it works for these items.
@aeliaNR We've released V3 version of our provider which includes all of the new Synthetics features and lots of bugfixes: https://registry.terraform.io/providers/newrelic/newrelic/latest/docs/guides/migration_guide_v3
If you have some time could you check if you still experience this issue with the new implementation? Thanks a lot
We haven’t heard back from you in a long time so we will close the ticket. If you feel this is still a valid request or bug, feel free to create a new issue.