Open asweet-confluent opened 12 months ago
Thank you for reporting this, @asweet-confluent. The team working actively with this resource has acknowledged this issue, and shall triage it further, based on their current task priority.
cc @amaor-newrelic
Facing same issue as the data source newrelic_notification_destination
is returning the top result from all the destination names starting with the name
attribute that's provided as the input.
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.