Importing existing CXone flows into Terraform state fails with ID mismatch

Trying to bring our existing CXone Studio flows under infrastructure-as-code control. We’ve got about 20 active flows that were built directly in the Studio UI over the last few years. I want to use terraform import to pull them into state so I can start managing them via code.

The documentation suggests using the flow ID, but the format seems off. Here’s what I’m running:

terraform import module.cxone.cxone_flow.main "12345678-1234-1234-1234-123456789012"

It throws this error:

Error: Error importing object "cxone_flow.main": expected ID to be in format "<org_id>/<flow_id>", got "12345678-1234-1234-1234-123456789012"

I tried prepending the org ID, which I grabbed from the CXone UI (it’s a long numeric string, not a UUID):

terraform import module.cxone.cxone_flow.main "98765432/12345678-1234-1234-1234-123456789012"

That gets past the format check, but then it fails during the import plan:

Error: Error refreshing state: 1 error occurred:
	* cxone_flow.main: error reading CXone Flow: GET https://api.mypurecloud.com/api/v2/flows/12345678-1234-1234-1234-123456789012: 404 Not Found

The flow definitely exists. I can see it in the UI. I can even fetch it via the REST API using Postman with a valid OAuth token. The endpoint /api/v2/flows/{flowId} works fine.

Is the Terraform provider looking for a different ID format? Or is there a specific prefix I need to add? I’ve checked the provider docs, but they just say “use the flow ID” without clarifying the exact string format for the import command.

Also, I noticed the provider version we’re using is 1.5.2. Should I upgrade before trying this again? The changelog mentions some fixes around resource identification, but nothing specific about import syntax.

Here’s the resource block I’m trying to import into:

resource "cxone_flow" "main" {
 name = "Customer Service Main"
 description = "Primary inbound flow"
 type = "IVR"
}

Any ideas on how to get this ID format right? I’m stuck on the import step and can’t move forward with managing the flow configuration in Terraform.