When a business service is manually deleted from PagerDuty, but not from the configuration, Terraform provider should restore the business service during the next apply. Unfortunately, it seems that the provider is not able to handle such cases and raises errors shown below.
resource "pagerduty_business_service" "example" {
name = "Example Business Service"
description = "Test description"
}
Debug Output
Planning failed. Terraform encountered an error while generating this plan.
╷
│ Error: Error reading Business Service
│
│ with pagerduty_business_service.example,
│ on service.tf line 1, in resource "pagerduty_business_service" "example":
│ 1: resource "pagerduty_business_service" "example" {
│
│ Could not decode JSON response: json: cannot unmarshal array into Go value
│ of type pagerduty.BusinessService
╵
Expected Behavior
Terraform plans to create the business service since it does not exist.
Actual Behavior
Terraform exits after a lenghty wait with the error shown above.
Steps to Reproduce
Please list the steps required to reproduce the issue, for example:
terraform apply to create the business service
Manually delete the business service in PagerDuty
Change anything in the configuration (e.g. the business service description)
When a business service is manually deleted from PagerDuty, but not from the configuration, Terraform provider should restore the business service during the next apply. Unfortunately, it seems that the provider is not able to handle such cases and raises errors shown below.
Terraform Version
Terraform v1.8.5 on linux_amd64
Affected Resource(s)
Please list the resources as a list, for example:
Terraform Configuration Files
Debug Output
Expected Behavior
Terraform plans to create the business service since it does not exist.
Actual Behavior
Terraform exits after a lenghty wait with the error shown above.
Steps to Reproduce
Please list the steps required to reproduce the issue, for example:
terraform apply
to create the business serviceterraform apply
again