Open kidk opened 1 year ago
Are there plans to make the provider warn when it run?
@whyman10x https://github.com/newrelic/terraform-provider-newrelic/releases/tag/v3.16.1 contains the deprecation warnings on the relevant resources. Hope that was what you were looking for.
This EOL has been delayed and will not happen end of June 2023. For more information check out our forum: https://forum.newrelic.com/s/hubtopic/aAX8W00000005XuWAI/updated-schedule-for-the-migration-to-alert-workflows-and-channels-eol
The new deadline is Dec 31, 2023.
So how to link policy to notification channel now? newrelic_alert_policy_channel
has channel_ids
, newrelic_alert_channel
doesn't.
Your own getting started guide still uses newrelic_alert_channel
and newrelic_alert_policy_channel
.
Hi @burner1024 - in order to link ~a policy to a notification channel~ (an alert policy can only be linked to a workflow that is linked to a notification channel), here's what you might want to do -
newrelic_notification_destination
resource (if you do not have one created already)newrelic_notification_channel
resource and reference the ID of the destination mentioned in (1)newrelic_workflow
resource, referencing the ID of the notification channel created in (2), and specify the predicate
argument in this resource as the following predicate {
attribute = "labels.policyIds"
operator = "EXACTLY_MATCHES"
values = [
<The ID of your alert policy goes here>
]
}
Thanks for letting us know about the contents of the "Getting Started" page - we'll get this updated soon. cc @kidk
@pranav-new-relic I recommend we update this, especially as the deadline approaches. It's not something we can 'consider' updating. We are misguiding users about how to effectively use the New Relic platform by giving them instructions with soon-to-be deprecated resources.
Hi @Fallenstedt - sorry, that was a misphrased bit of the comment that I've just updated. The idea is to get this corrected soon, owing to the reasons you've mentioned, and I've opened a discussion with my team already, to see when we can get this done based on our current task priority. Thank you for your inputs 🙌
@pranav-new-relic Is there any update to the docs being refreshed to include examples of the proper way to use newrelic_notification_destination
? I ran across this and wonder if this is an edge case that needs consideration, or if I'm using workflow predicates incorrectly.
In your prior comment you mentioned adding the ID of the alert policy as a predicate value. Does newrelic_workflow:issues_filter
support multiple predicates if I am looking to match on an accumulation of tags, or am I to merely include a second issue_filter{}
, one with the tag accumulations and another with the notification_channel id?
@davetron33 the changes are currently in review, and will mostly be out with the next release of the Terraform Provider. To answer your question, multiple predicates can be added to the same issues_filter
block in the newrelic_workflow
resource, as stated by this phrase in the docs of the resource. An example -
issues_filter {
name = "sample_issues_filter"
type = "FILTER"
predicate {
attribute = "labels.policyIds"
operator = "EXACTLY_MATCHES"
values = [sample_policy.id]
}
predicate {
attribute = "accumulations.tag.team"
operator = "EXACTLY_MATCHES"
values = ["random"]
}
}
Thanks for that @pranav-new-relic! I had indeed misread how to use multiple predicates there. Cheers!
There is still room for improvement with the documentation!
The warning message on newrelic_alert_policy_channel is wrong and should reference newrelic_workflow
The full scenario examples on newrelic_notification_channel should absolutely include the newrelic_workflow
The documentation should be clear that:
On another note pulling the destination out of the channel definition for 'reasons' is a bad move. In my experience they have the same lifecycle
I ended up here after battling with the documentation. There is no documented alternative to these deprecated resources and arguments. Would be nice to update the actual doc it instead to create an issue in Github to let people know about this change?
Thanks for the feedback, @Maxwell2022. We currently have a note about the deprecation (as specified in this issue) with a link to the alternative to the deprecated newrelic_alert_channel
and newrelic_alert_policy_channel
in the note at the top of the documentation of these resources
newrelic_notification_channel
, along with newrelic_notification_destination
and newrelic_workflow
. An updated example which includes setting up alerts and notifications through a channel and destination via the above three resources may be found here.
From @jeropaul's feedback too, I agree that the alternatives, though listed in the docs of the deprecated resources, do not give a complete idea on how they may be used (as a replacement of the deprecated resources) - we might want to have the example I've linked above referenced to the docs of the two deprecated resources. We'll try making this change based on our priority queue - thank you for reporting this.
should newrelic_alert_policy_channel
mention newrelic_workflow
. This has been reported back in August last year and the doc is still not updated.
This terraform documentation needs a good clean up, there is documented migration from v1.x to v2.x for resource that are now deprecated in v3. It's super confusing.
Hi everyone
I want to make you all aware of an upcoming EOL that will impact all version of the New Relic Terraform provider currently available.
The following components will stop working end of Dec 31, 2023:
Resources
Data sources
For more information check out https://forum.newrelic.com/s/hubtopic/aAX8W0000008dKOWAY/plan-to-upgrade-alert-notification-channels-to-workflows-and-destinations
As a replacement, which adds additional features and functionality, you can use the following components:
Resources
Data sources
If you have any questions or concerns, please don't hesitate to reach out by creating a ticket or replying to this one.
Thanks a lot The Observability as Code team