Context:
Provisioning custom AI bots via genesyscloud_ai_bot on AU-1 BYOC. Provider v1.20.0. Pipeline uses GitHub Actions. Deployment fails during terraform apply.
Error: Error creating AI Bot: 400 Bad Request
Response: {"message":"Invalid payload for AI Bot configuration","errors":[{"code":"invalid_request","message":"Missing required field 'definition' for type 'CUSTOM_AI'"}]}
HCL snippet:
resource "genesyscloud_ai_bot" "support_bot" {
name = "Support Bot Auto"
description = "Managed by Terraform"
type = "CUSTOM_AI"
definition = jsonencode({
version = "1.0"
intents = []
})
}
The definition block is present. JSON structure matches API docs for /api/v2/ai/bots. Manual API call via Postman with same payload succeeds. Terraform provider seems to strip or modify the JSON before sending. Debug logs show empty body in request.
Question:
Is genesyscloud_ai_bot handling the definition JSON correctly in v1.20.0? Or is this a known bug with BYOC endpoints? Workaround needed for pipeline.