PagerDuty / terraform-provider-pagerduty

Terraform PagerDuty provider
https://www.terraform.io/docs/providers/pagerduty/
Mozilla Public License 2.0
204 stars 208 forks source link

Escalation Policy unable to find by name when too many matching results #877

Closed imjaroiswebdev closed 1 week ago

imjaroiswebdev commented 1 month ago

data.pagerduty_escalation_policy is unable to find by the provided name when there's the queried EP name is not the first page of results.

Terraform Version

v1.6.6 provider registry.terraform.io/pagerduty/pagerduty v3.12.2

Affected Resource(s)

Please list the resources as a list, for example:

Terraform Configuration Files

data "pagerduty_escalation_policy" "test" {
  name = "Prod Escalation"
}

Panic Output

│ Error: Unable to locate any escalation policy with the name: Prod Escalation
│
│   with data.pagerduty_escalation_policy.test,
│   on main.tf line 56, in data "pagerduty_escalation_policy" "test":
│   56: data "pagerduty_escalation_policy" "test" {

Expected Behavior

What should have happened? Escalation Policy found.

Actual Behavior

What actually happened? Escalation Policy not found when queried EP name is not in the first page of results.

Steps to Reproduce

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

  1. terraform apply