terraform-provider-newrelic
terraform-provider-newrelic copied to clipboard
Migrate synthetics resources to GraphQL API
Objective
The current synthetics resources are based on the REST API. The New Relic GraphQL library now supports Synthetic calls: https://api.newrelic.com/graphiql?#query=mutation%20%7B%0A%20%20syntheticsCreateMonitor%0A%7D%0A This work will track the migration of the resources to the new API.
Open questions
- Will we be able to keep backwards compatibility?
Hey @kidk, it looks like the next generation of synthetic monitoring runtime was recently announced on the forum and blog, including Nerdgraph/GraphQL API additions - which is great!
Would you happen to know when these changes are expected to make their way into the Terraform provider (and help take a big chunk out of the Synthetics GraphQL?
As soon as we can 😄 Currently targeted for this quarter
Fingers-crossed, looking forward to it!
Outta interest, would it include all types of monitors, such as the Broken Links and SSL Cert Expiration (#1585) which are currently outside the scope of the Terraform provider?
It should 😄 at the moment our priority is to get feature parity, without too much change on the resource definition side. Depending on the effort required to get these new features in they might come at a later date. I hope to have more information over the coming weeks. I'll update this thread when I do.
Thank you, really appreciate you sharing some background.
I don't want to add pressure or anything, but monitors created with the current version of the provider are born in the legacy Node 10 runtime, which is currently being phased out. Since there are significant breaking changes for scripted Browser and APIs, it's... less than optimal, that new monitors be created in the legacy version, as there's quite a bit of effort involved in migrating them to new new one whenever the change comes.
As of now I'm creating monitors with terraform then manually going over each one to change their runtime version to the new Node 16, as to be able to write the scripts in forward compatible syntax.
We currently have it planned to have this ready end of June. There's already a couple of PR's open with first draft of changes.
Any update as to when this will be available?
We hit some API blockers during the implementation. The work is planned to continue in September.
We've released V3 version of our provider which includes all of the new Synthetics features: https://registry.terraform.io/providers/newrelic/newrelic/latest/docs/guides/migration_guide_v3
This completes the migration of synthetics resources from REST to GraphQL 🥳
Please let us know if you have any questions. If you encounter any issues please don't hesitate to create a new ticket.
I'll close this ticket as the work has been delivered. Feel free to continue the discussion if needed.