Skip to content

bug: lacework_alert_rule without subcategories yields an error on apply #597

Open
@danthegoodman

Description

@danthegoodman

Describe the bug
I tried to create a lacework_alert_rule without subcategories. I got an error. I was able to create it online and import it with no changes just fine.

To Reproduce

resource "lacework_alert_rule" "slack" {
  name           = "Slack"
  alert_channels = [local.slack_channel_id]
  severities     = ["Critical", "High"]
  description    = "Send all Crit and High alarms to Slack"
}

Expected behavior
The alert rule to be created correctly.

Screenshots

lacework_alert_rule.slack: Creating...
│ Error: 
│   [POST] https://outschool.lacework.net/api/v2/AlertRules
│   [400] Invalid data: #1: [filters/subcategory: instance type (null) does not match any allowed primitive type (allowed: ["array"])] 
│ 
│   with lacework_alert_rule.slack,
│   on alert-rules.tf line 6, in resource "lacework_alert_rule" "slack":
│    6: resource "lacework_alert_rule" "slack" {
│ 

Please complete the following information):

  • OS: registry.gitlab.com/gitlab-org/terraform-images/releases/1.4:v1.0.0
  • Provider Version: 1.17.0

Additional context
Add any other context about the problem here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions