Noticed the provider nullifying transition targets right before the HTTP POST. The 02:30 JST bot deployment pipeline stalled again. State backup shows zero drift, but the run won’t proceed past apply. Terraform 1.9.8 paired with nice-cxone 1.19.6 throws a 422 Unprocessable Entity when pushing the nice_cxone_ai_bot resource. The payload hits /api/v2/conversational-automation/bots and chokes on the dialog_flow_id attribute.
Checked the raw request body. The nlu_engine_version is set to v2.1 and the dialog_flow_id references a valid Architect export. Console shows the flow published without warnings. Tried forcing a plan refresh. State file confirms the remote ID matches the local reference. Reverted to provider 1.19.4 just in case. Same 422 response. The API error payload returns {“code”: “INVALID_DIALOG_STRUCTURE”, “message”: “Node transition references undefined target: fallback_escalation”}. That node exists in the flow. It’s doing jack all to help.
Ran the exact same JSON payload through the Postman collection against the staging tenant. Endpoint returns 201 Created instantly. Provider must be stripping or reordering the dialog_nodes array during the HTTP POST. Checked the provider source on GitHub. The ai_bot_resource.go file handles the payload serialization with a custom struct. Looks like the transition_conditions map gets flattened incorrectly when nested intents are present.
Anyone see the provider mangle the dialog tree serialization before the API call? Current workaround is manual console import, which breaks the compliance audit trail. Logs below show the exact diff between the Terraform provider request and the successful Postman call.
// Provider Request Body
{
"name": "SupportBot_v4",
"nlu_engine_version": "v2.1",
"dialog_flow_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"dialog_nodes": [
{
"id": "root",
"conditions": "text",
"transitions": {
"fallback_escalation": null
}
}
]
}
// Postman Request Body (201 OK)
{
"name": "SupportBot_v4",
"nlu_engine_version": "v2.1",
"dialog_flow_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"dialog_nodes": [
{
"id": "root",
"conditions": "text",
"transitions": {
"fallback_escalation": "escalation_handler"
}
}
]
}
The provider is literally nullifying the transition target right before the POST. State backup doesn’t catch it. Pipeline stays red.