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

Grouping alert for a time_window should be allowed whatever the grouping type is. #788

Closed
Nikokolas3270 opened this issue Dec 18, 2023 · 2 comments · Fixed by #795
Closed

Comments

@Nikokolas3270
Copy link

Terraform Version

  • Terraform v1.5.7
  • provider registry.terraform.io/pagerduty/pagerduty v3.3.1

Affected Resource(s)

  • pagerduty_service

If this issue appears to affect multiple resources, it may be an issue with Terraform's core, so please mention this.

Terraform Configuration Files

resource "pagerduty_service" "my_service" {
    ...
    alert_grouping_parameters {
        type = "content_based"
        config {
            aggregate = "all"
            fields = ["custom_details.source_id"]
            time_window = 900
        }
    }
}

Debug Output

Plan: 1 to add, 0 to change, 0 to destroy.
╷
│ Error: Alert grouping parameters configuration attribute "time_window" is only supported by "intelligent" type Alert Grouping
│
│   with module.pagerduty_services.pagerduty_service.services["my_service"],
│   on pagerduty_services/main.tf line 6, in resource "pagerduty_service" "services":
│    6: resource "pagerduty_service" "services" {
│

Expected Behavior

It should be okay to set a time_window even if the type is content_based.
Indeed manually tweaking the "Alerts may be grouped if they arrive within a XXX window" setting is possible whatever the alert grouping type is chosen.

Actual Behavior

Setting a time_window is not possible if the type is content_based.

Steps to Reproduce

  1. Create a pagerduty_service with the given alert_grouping_parameters
  2. Run terraform apply

Important Factoids

Issue occurs on all versions providing the time_window setting (version >= 3.2.0)

References

Some other recent issue on the content_based type: #778

@buffyg
Copy link
Contributor

buffyg commented Jan 4, 2024

Fix submitted: #795

@Nikokolas3270
Copy link
Author

Thanks! I was actually gonna submit the exact same fix :)

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