Skip to content

Terraform provider panics when case notifications list contains an empty entry #3322

@andrewbissel

Description

@andrewbissel

Datadog Terraform Provider Version

v3.79.0

Terraform Version

v1.13.5

What resources or data sources are affected?

datadog_security_monitoring_rule

Terraform Configuration Files

resource "datadog_security_monitoring_rule" "empty_notification_example" {
  name = "Empty Notification Entry"
  type = "log_detection"

  query {
    query       = "source:test @msg:test"
    aggregation = "count"
  }

  case {
    status        = "low"
    condition     = "a > 0"
    notifications = [""]  # empty entry triggers panic
  }

  message = "message.\n"
}

Relevant debug or panic output

No response

Expected Behavior

Ignore or error

Actual Behavior

Provider Panic

Steps to Reproduce

No response

Important Factoids

No response

References

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions