You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Creating or updating the alert_grouping_parameters settings for the type time for service in Terraform, should not result in an API error.
Actual Behavior
When creating or updating a service that uses the alert_grouping_parameters of type time, the TF-apply fails with an API error.
According to the PD-API spec (https://developer.pagerduty.com/api-reference/fbc6e9f4ef8eb-update-a-service), it's not allowed to set the alert_grouping_parameters.config.time_window alert_grouping_parameters.config.aggregate properties when using "type=time", but the provider actually always adds this property, independently from the type attribute.
Even though when setting alert_grouping_parameters.config.time_window to null, it's not omitted in the API-request.
I would assume that this has been introduced by a change/limitation on the PagerDuty-API side, this changelog seems to confirm it because a few days ago we were able to set such a configuration on some of our services (when updating them via Terraform). Today, it doesn't work anymore.
terraform will perform the following actions:
# pagerduty_service.test_service will be updated in-place
~ resource "pagerduty_service" "test_service" {
id = "PHV9J4Z"
name = "test-service"
~ alert_grouping_parameters {
+ type = "time"
+ config {
+ timeout = 15
}
}
# (2 unchanged blocks hidden)
}
Plan: 0 to add, 1 to change, 0 to destroy.
Do you want to perform these actions?
Terraform will perform the actions described above.
Only 'yes' will be accepted to approve.
Enter a value: yes
pagerduty_service.test_service: Modifying... [id=PHV9J4Z]
╷
│ Error: Error reading: PHV9J4Z: PUT API call to https://api.eu.pagerduty.com/services/PHV9J4Z failed 400 Bad Request. Code: 2001, Errors: [config has invalid fields.], Message: Invalid Input Provided
│
│ with pagerduty_service.test_service,
│ on service-test.tf line 1, in resource "pagerduty_service" "test_service":
│ 1: resource "pagerduty_service" "test_service" {
│
Releasing state lock. This may take a few moments...
Steps to Reproduce
create/update the pagerduty_service.test_service.alert_grouping_parameters.config.timeout property
terraform apply
The text was updated successfully, but these errors were encountered:
Terraform Version
Affected Resource(s)
Terraform Configuration Files
Debug Output
https://gist.github.com/luca-bozzetto-depop/68ccb43f7d2147db18848755d3898b25
Expected Behavior
Creating or updating the alert_grouping_parameters settings for the type
time
for service in Terraform, should not result in an API error.Actual Behavior
When creating or updating a service that uses the
alert_grouping_parameters
of typetime
, the TF-apply fails with an API error.According to the PD-API spec (https://developer.pagerduty.com/api-reference/fbc6e9f4ef8eb-update-a-service), it's not allowed to set the alert_grouping_parameters.config.time_window alert_grouping_parameters.config.aggregate properties when using "type=time", but the provider actually always adds this property, independently from the type attribute.
Even though when setting alert_grouping_parameters.config.time_window to null, it's not omitted in the API-request.
I would assume that this has been introduced by a change/limitation on the PagerDuty-API side, this changelog seems to confirm it because a few days ago we were able to set such a configuration on some of our services (when updating them via Terraform). Today, it doesn't work anymore.
Steps to Reproduce
The text was updated successfully, but these errors were encountered: