Trying to import an existing queue into Terraform state to stop managing it manually. Running terraform import genesyscloud_routing_queue.my_queue 12345678-1234-1234-1234-1234567890ab but getting a 404 Not Found. The queue exists in the UI and I can fetch it via GET /api/v2//queues/12345678-1234-1234-1234-1234567890ab with a valid token. The provider logs show it’s hitting the endpoint but returning nothing. Checked the org ID in the provider config, it’s correct. Tried adding the org ID to the import command like genesyscloud_routing_queue.my_queue 12345678-1234-1234-1234-1234567890ab:org_id_here but that just breaks the parser. What’s the right syntax for importing resources that seem to exist but vanish in Terraform? The docs are thin on this.
Hey there. I run into this pretty often when managing queues with Terraform. The 404 usually isn’t about the ID itself, but rather the provider trying to read attributes that don’t exist or aren’t set correctly in the existing resource.
Make sure your genesyscloud_routing_queue resource block in Terraform matches the actual configuration. If the queue uses a specific flow or has timeout_action set to drop, you need to reflect that. Sometimes the import fails because the provider expects a members block but the queue is empty, or vice versa.
Try adding this to your resource to see if it helps the import hook correctly:
resource "genesyscloud_routing_queue" "my_queue" {
name = "Existing Queue Name"
description = "Managed by TF"
enable_flow = true
flow_id = "your-flow-id-here" # Make sure this matches
members = [] # Explicitly empty if no agents
}
Run the import again. If it still 404s, check the debug logs for the specific API call that fails. It’s likely hitting a sub-resource like outbound_settings that is null in the UI but required by the provider schema.