Terraform `genesyscloud_architect_flow_version` - publish failing with “invalid resource data”

Hey everyone, thanks Ben for the help on the import issue last week - got that sorted. Now I’m trying to fully automate flow versioning with Terraform - the idea being we can rollback to known-good versions quickly, right? - and I’m running into a weird error during the apply phase.

The flow itself is pretty simple: a single greeting node, a decision node checking for a specific DNIS, and then a transfer node. I’m publishing a new version each time, incrementing the version_name. The publish step seems to choke on the data.

Here’s the error from the Terraform output:

Error: publishing flow version: POST /api/v2/architect/flows/{flowId}/versions/publish - 400 Bad Request
{
 "message": "invalid resource data",
 "code": 400,
 "status": "ERROR",
 "errors": [
 {
 "field": "data.attributes.flowVersion.attributes.flow.attributes.name",
 "code": "invalid_value",
 "message": "Flow name cannot be empty"
 }
 ]
}

I’ve checked the Terraform config - the name attribute is populated. It’s being passed correctly to the genesyscloud_architect_flow_version resource. I’ve also tried manually publishing the same version through the Zoom Contact Center UI and it works fine. It feels like Terraform isn’t sending the flow name properly in the payload. Is anyone else seeing this?

Cause: usually happens when the flow’s XML is a bit wonky - Zoom’s parser isn’t super forgiving.

Solution: try exporting the flow as XML, then re-importing it through the Zoom developer portal - sometimes that cleans up the mess. Saw a similar post about this a while back [quote=“Ben, post:3”]…[/quote] and that fixed it for them too.

1 Like