Open philippfrank opened 2 years ago
Looks like we need to update our documentation. The correct way to fill in a block from a source is with a dynamic block e.g.
resource "logdna_view" "test" {
name = "Basic View"
query = "level:debug my query"
dynamic email_channel {
for_each = data.logdna_alert.external_remote.email_channel
content {
immediate = email_channel.value["immediate"]
operator = email_channel.value["operator"]
terminal = email_channel.value["terminal"]
triggerinterval = email_channel.value["triggerinterval"]
triggerlimit = email_channel.value["triggerlimit"]
emails = email_channel.value["emails"]
}
}
}
@jakedipity - yes, that works - thank you. Please update the docs, other folks were having the same or related issues:
cc https://github.com/logdna/terraform-provider-logdna/issues/44 https://github.com/logdna/terraform-provider-logdna/issues/26
@philippfrank - This fix does not attach the preset to the view. Instead, it creates as a view specific alert. I was expecting to see something like a preset and used by multiple views in the LogDNA UI
This does not work (1.8.0):
https://github.com/logdna/terraform-provider-logdna/blame/main/docs/data-sources/logdna_alert.md#L80