0.12.28
data "newrelic_entity" "entity" {
name = "${var.name} - ${var.uri}"
}
resource "newrelic_entity_tags" "tags" {
guid = data.newrelic_entity.entity.guid
dynamic "tag" {
for_each = var.tags
content {
key = tag.key
values = list(tag.value)
}
}
}
terraform plan should succeed
Got an Error in terraform plan (redacted the monitor name)
Error: Provided filter: name LIKE 'Very Long Monitor Name that is 196 chars long' is not a valid NRQL query (The search term for EntitySearchIdentifier(value=name, tagsIdentifier=false) is 196 chars long, the maximum allowed is 150), null
--
1373 | 聽
1374 | on modules/synth_script_az/main.tf line 48, in data "newrelic_entity" "entity":
1375 | 48: data "newrelic_entity" "entity" {
Please list the steps required to reproduce the issue, for example:
Hi @MAN98, thanks for reporting this. This looks like an upstream API issue. This is likely due to the differences between the Synthetics REST API and NerdGraph API. If I recall correctly, monitors created via the New Relic UI are created with the REST API which doesn't seem to contain this kind of validation. The newrelic_entity data source leverages NerdGraph which contains the server-side validation.
We'll pass this information to the NerdGraph team so they are aware of this.
In the meantime, would it be possible to shorten your monitor names from the UI? That could be a bit much depending on how many monitors your account has. There's also the option of editing via a script that utilizes the REST API.
@sanderblue - Yes I have made some changes to my code to shorten the name of the Synthetic to workaround this issue. Thank you for replying.
Great thanks. Closing given this is an issue with an upstream API
Most helpful comment
@sanderblue - Yes I have made some changes to my code to shorten the name of the Synthetic to workaround this issue. Thank you for replying.