We’ve been running a custom Client App that dynamically updates queue attributes via the API for the last few months. Now we’re trying to get that infrastructure under version control using the Genesys Cloud Terraform provider.
I ran terraform import for an existing queue:
terraform import gen_cloud_routing_queue.main 12345678-abcd-1234-abcd-1234567890ab
The command completes without error, and the state file shows the resource ID. But when I run terraform plan, it wants to destroy the queue and recreate it. It thinks the local config is empty or mismatched.
Here’s the resource block I’m working with:
resource "gen_cloud_routing_queue" "main" {
name = "Support Tier 1"
description = "Primary support queue"
enabled = true
out_of_office_enabled = false
}
The error during plan isn’t a hard failure, just a massive diff showing the queue as new. I’ve checked the ID against the UI and it’s correct. The queue definitely exists.
I tried adding the email_address attribute since that’s usually required, but the plan still shows a recreation. Is there a specific set of attributes that need to match exactly for the import to stick? Or is the provider having trouble reading the state back from the API after the import command?
I’ve verified the API token has routing:queue:read permissions. The debug logs show a 200 OK on the GET request for the queue details, so it’s pulling data. It just doesn’t seem to reconcile it with the state file properly.
What am I missing in the import syntax?