We’ve been pushing raw interval data through a Python script that hits /api/v2/analytics/conversations/queries directly, but the infra team wants the reporting views tracked in state now. Trying to bring existing dashboard configurations into the Terraform provider using terraform import keeps breaking. The docs say the import ID format should be resource_type/id, so I ran terraform import genesyscloud_view_reporting.custom_view 1a2b3c4d-5e6f-7g8h-9i0j-k1l2m3n4o5p6. The command hangs for a second then throws a 404 Not Found when the provider tries to fetch the resource via GET /api/v2/views/1a2b3c4d-5e6f-7g8h-9i0j-k1l2m3n4o5p6.
I checked the actual API response in Postman and that exact UUID returns a 200 OK with the full JSON payload. The Terraform provider seems to be dropping the analytics/ segment from the route. Here’s the resource block we’re targeting: resource "genesyscloud_view_reporting" "custom_view" { name = "SLA_Breach_Aggregate" description = "Auto-generated by analytics pipeline" view_json = file("${path.module}/views/sla_breach.json") }
The provider logs show it’s calling /api/v2/views/{id} instead of /api/v2/analytics/views/{id}. I’ve tried adding a custom import block in the .tf file with import { to = genesyscloud_view_reporting.custom_view id = "analytics/views/1a2b3c4d-5e6f-7g8h-9i0j-k1l2m3n4o5p6" } but the state sync still fails with Error refreshing state: 1 error occurred. Our view_json payload contains nested interval groupings and metric calculations that the import routine doesn’t parse correctly. The routing logic inside provider seems to strip prefix before it sends GET request to gateway.
Anyone found a workaround for the import path resolution? The API client credentials are scoped correctly to analytics:view:read and the token refresh works fine for our Python scripts. Just the state import keeps misrouting the GET request. Running terraform -v shows v1.8.4 with the provider at v1.52.0. The state file just stays empty after the refresh loop crashes and I don’t see where the path mapping gets overridden.