Error when creating alert condition
Closed this issue · 3 comments
gkocur commented
Hello,
I'm trying to create the alert condition for the stream.
When I use the example form the documentation:
resource "graylog_alert_condition" "test-terraform" {
type = "field_content_value"
stream_id = graylog_stream.some_stream.id
title = "test"
field_content_value_parameters = {
field = "message"
value = "hoge hoge"
backlog = 1
query = "*"
grace = 0
}
}
I get error:
terraform plan
Error: Unsupported argument
on graylog.tf line 193, in resource "graylog_alert_condition" "test-terraform":
193: field_content_value_parameters = {
An argument named "field_content_value_parameters" is not expected here. Did
you mean to define a block of type "field_content_value_parameters"?
The same for other alert condition types.
I use terraform version 0.12.8 and plugin version 8.0.0.
gkocur commented
BTW the same problem with alarm notifications.
Error: Unsupported argument
on graylog.tf line 179, in resource "graylog_alarm_callback" "collaborate-api-errors":
179: slack_configuration = {
An argument named "slack_configuration" is not expected here. Did you mean to
define a block of type "slack_configuration"?
Maybe I do something wrong?
suzuki-shunsuke commented
Thank you for your feedback.
Sorry but the example is invalid for Terraform v0.12 .
The example is for Terraform v0.11 .
https://www.terraform.io/upgrade-guides/0-12.html#attributes-vs-blocks
https://github.com/suzuki-shunsuke/go-graylog/blob/master/terraform/example/v0.12/alert_condition.tf
gkocur commented
Thank you, it of course solved this problem.