Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mandatory block in coralogix_alert resource is not documented properly #231

Open
rudolf-repcin opened this issue May 7, 2024 · 1 comment

Comments

@rudolf-repcin
Copy link

rudolf-repcin commented May 7, 2024

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
Copy link
Contributor

celaus commented Jun 17, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants