Mandatory block in coralogix_alert resource is not documented properly
Opened this issue · 1 comments
rudolf-repcin commented
Affected Resource(s)
- coralogix_alert
Terraform Configuration Files
resource "coralogix_alert" "count_get_response_times_warning" {
name = "${local.alert_display_name} [Number of GET with response times P90 >= 500ms]"
enabled = var.enable_alerts
severity = "Warning"
meta_labels = {
application = var.aws_account_name
subsystem = var.ecs_service_name
}
standard {
search_query = ".......omitted..... AND http_request.duration_ms: [500 TO *} ${local.get_http_method_condition_q1}"
applications = [var.aws_account_name]
subsystems = [var.ecs_service_name]
severities = [
"Info", "Error"
]
condition {
more_than = true
threshold = var.cx_get_slow_request_threshold
time_window = var.cx_get_slow_request_time_window
}
}
}
Debug Output
Error: internal error in Coralogix backend.
│ error - rpc error: code = Internal desc = statusCode: 400, response: {"success":false,"status":400,"message":"alert definition, notificationGroups is invalid , SequelizeValidationError: Must have at least 1 notificationGroups item"}
│ url - com.coralogix.alerts.v2.AlertService/CreateAlert
Expected Behavior
notification_group
should be either documented as required or allowed to be optional in CX backend
Actual Behavior
notification_group
must be specified otherwise TF plan fails
Important Factoids
Coralogix TF provider v1.14.1
TF v1.8.2
Community Note
- Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
- If you are interested in working on this issue or have submitted a pull request, please leave a comment
celaus commented
Hi! Thanks for reporting this, we are currently working on updating the alerts API which should also take care of this issue. Until then please be patient and use some kind of notification group for all requests 😓
I'll leave this issue open in case someone from the future encounters this error.