migrating our routing infrastructure to the CX-as-Code Terraform provider. While we have successfully managed user and division resources, we are encountering persistent issues when attempting to import existing routing queues that contain custom attributes. The standard import command appears to handle the basic configuration, but it seems to ignore or fail to reconcile the custom attributes defined in the API response.
We have executed the import command for a specific queue:
terraform import genesyscloud_routing_queue.support_queue 12345678-1234-1234-1234-1234567890ab
The state file is updated with the resource ID, and a subsequent terraform plan shows no changes for standard fields like name or description. However, the custom attributes remain out of sync. When we inspect the state, the custom_attributes block is either empty or contains stale data from the initial plan, despite the API endpoint /api/v2/routing/queues/12345678-1234-1234-1234-1234567890ab returning the correct key-value pairs.
We have verified the following steps:
- The Genesys Cloud provider version is 1.35.0.
- The queue exists in the Genesys Cloud environment with three custom attributes.
- The Terraform configuration file includes a
custom_attributesblock matching the API response structure. - A
terraform refreshdoes not update the custom attributes in the state file. - The API response JSON for the queue includes the
custom_attributesfield populated correctly.
It seems the import process does not fetch the full resource definition from the API, or perhaps the provider requires a specific flag to include custom attributes during the import phase. Is there a documented method to force a full state sync for custom attributes during an import operation? Or should we be manipulating the state file manually using terraform state replace-provider or similar commands to align the local state with the remote API data?
We are hesitant to recreate the queue in production due to the potential disruption to active routing rules and agent assignments. Any insight into how the provider handles complex nested attributes during import would be appreciated.