newrelic / terraform-provider-newrelic

Terraform provider for New Relic
https://registry.terraform.io/providers/newrelic/newrelic/latest/docs
Mozilla Public License 2.0
199 stars 243 forks source link

Add newrelic_application resource #1943

Open luispabon opened 1 year ago

luispabon commented 1 year ago

Feature Description

The newrelic_application resource will be responsible for creating an APM app on the newrelic account, given its name.

Describe Alternatives

No good solutions exist. See additional context below

Additional context

Right now there's a chicken and egg situation. Deploying any newrelic resources that latch on to a specific newrelic "app" is impossible, unless the application already exists on newrelic.

The only way for those newrelic apps to get created is setting up a service, add the newrelic apm agent to it, deploying it, then hope for the best that telemetry being sent creates the app in newrelic for you. This makes it impossible to have the service's terraform infra together with the newrelic resources you want to create, as on first deployment said app won't exist yet.

essjayhch commented 1 year ago

This is a massive nuisance on our workflow too, as you have to have multi-stage deployments, one to deploy the app with newrelic enabled for the app, and another to add the monitoring conditions that rely on it.

For those who think this is a "non-issue", we (as do many) deploy brand new instances of our app multiple times a day. Not everyone's application layout is static and un-changing. It's precisely why we require the ability to orchestrate our NR alert policies et al.