Hey folks,
Running into a snag with the Genesys Cloud Terraform provider. I’m trying to reference an existing routing strategy by name using a data source, but the plan keeps failing with a 404 error. It’s weird because I can see the resource in the UI and the name matches exactly.
Here’s the block I’m using:
data "genesyscloud_routing_strategy" "main_strategy" {
name = "Default IVR Strategy"
}
When I run terraform plan, I get this error:
Error: Resource not found
│
│ with data.genesyscloud_routing_strategy.main_strategy,
│ on main.tf line 12, in data "genesyscloud_routing_strategy" "main_strategy":
│ 12: data "genesyscloud_routing_strategy" "main_strategy" {
│
│ The routing strategy "Default IVR Strategy" could not be found
I’ve double-checked the spelling. No extra spaces, no case mismatches. I even tried creating a new strategy with a unique name and got the same result. The API docs for the provider say it should look up by name, but it seems like it might be expecting an ID or something else.
I tried adding a description filter just to see if it helped, but that didn’t change anything. Is there a known issue with name-based lookups for routing strategies in the latest provider version? Or am I missing a required attribute in the data source block?
We’re using provider version 1.52.0. The rest of our IaC setup is working fine, just this specific data source lookup is throwing a fit. I can’t hardcode the ID because it changes across our dev, stage, and prod environments, so I really need this dynamic lookup to work.
Any ideas on how to debug this or a workaround? I’ve been staring at the HCL file for an hour and it just looks correct to me. Maybe I need to check if the resource is fully synced or something? Not sure where to go from here.