newrelic_notification_destination
references wrong destination
#2468
Labels
newrelic_notification_destination
references wrong destination
#2468
Terraform Version
Affected Resource(s)
newrelic_notification_destination
data sourceTerraform Configuration
When looking up a
newrelic_notification_destination
with thename
parameter, the API endpoint used seems to be doing a full text search instead of filtering to exact matches. The data source implementation grabs the first result and silently discards the rest. In some cases, this causes an unexpected destination to be used.In my example above, the search for a notification destination named
Confluent
results in the following response captured usingTF_LOG=debug
:The response contains one Slack destination named
Confluent
(the expected result), and a PagerDuty destination namedConfluent PagerDuty
. Because the PagerDuty destination is the first result, it gets used:I tried the same thing on a different account with the same setup and the response order was reversed, causing the correct destination to be used. I'm guessing it's because the Slack destination on that account has a later creation date, causing it to show up first in the search results.
The text was updated successfully, but these errors were encountered: