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

pagerduty_service becomes uneditable after adding pagerduty_alert_grouping_setting + content_based_intelligent #949

Open
18jwong opened this issue Nov 6, 2024 · 0 comments

Comments

@18jwong
Copy link

18jwong commented Nov 6, 2024

Terraform Version

Terraform v1.9.7

Affected Resource(s)

  • pagerduty_service
  • pagerduty_alert_grouping_setting

Terraform Configuration Files

resource "pagerduty_service" "integration_test2" {
  name              = "[TESTING] Integration Test Service 2"
  escalation_policy = ...
  alert_creation    = "create_alerts_and_incidents"
  incident_urgency_rule {
    type    = "constant"
    urgency = "low"
  }
}

resource "pagerduty_alert_grouping_setting" "integration_test2" {
  name     = "Default Alert Grouping for all engineering systems"
  type     = "content_based_intelligent"
  services = [pagerduty_service.integration_test2.id]
  config {
    aggregate   = "all"
    fields      = ["severity"]
    time_window = 300
  }
}

Steps to Reproduce

Please list the steps required to reproduce the issue, for example:

  1. terraform apply
  2. change anything on the pagerduty_service e.g. name = "[TESTING] Integration Test Service 2a"
  3. terraform apply again

Expected Behavior

pagerduty_service should change accordingly e.g. name should now be "[TESTING] Integration Test Service 2a"

Actual Behavior

Error: Error reading: P36WBBS: PUT API call to https://api.pagerduty.com/services/P36WBBS failed 400 Bad Request. Code: 2001, Errors: [Alert grouping is invalid.], Message: Invalid Input Provided

  with pagerduty_service.integration_test2,
  on main.tf line 43, in resource "pagerduty_service" "integration_test2":
  43: resource "pagerduty_service" "integration_test2" {
}

The error specifically happens when using the new content_based_intelligent setting in pagerduty_alert_grouping_setting, I suspect because it's not a valid alert grouping for the pagerduty_service resource.

image

Workaround

Don't use the new content_based_intelligent setting.

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

1 participant