I’m newer to Terraform and understand that it is infrastructure as code, and have built out EC2 instances and all with it. I was going over the New Relic provider, particularly the
Use this data source to get information about a specific alert policy in New Relic that already exists. More information on Terraform’s data sources can be found here.
If it already exists in New Relic, what’s the use of the above
newrelic_alert_policy as a terraform data source then? Is it simply to create a link between it and an existing New Relic
newrelic_alert_channel? (https://registry.terraform.io/providers/newrelic/newrelic/latest/docs/data-sources/alert_channel), using the Terraform code? I guess I want to be sure I understand the utility of it, if Terraform isn’t being used to actually create a new alert policy.
I’ve already seen how we can use an existing New Relic APM application to derive data from that and build out dashboards in New Relic using the APM data, so that makes sense.