Is it possible to bypass the strict JSON schema validation for custom fields in a Data Action when deploying via Terraform?
Environment: US-1 Production. Provider v1.15.4.
Attempting to apply a genesyscloud_data_action resource. The configuration includes a custom input field with a complex nested object structure. The apply fails immediately with HTTP 400 Bad Request.
Error log:
Error: POST /api/v2/analytics/data-actions: 400 Bad Request
{"errors":[{"code":"invalid_body","message":"Invalid JSON in input definition","parameter":"inputs[0].definition"}]}
The HCL block:
resource "genesyscloud_data_action" "test_action" {
name = "Custom_Validation_Test"
description = "Test nested input"
inputs {
name = "payload"
type = "object"
definition = jsonencode({
type = "object"
properties = {
details = {
type = "object"
properties = {
ref = {
type = "string"
}
}
}
}
})
}
}
Manual API call using Postman with identical JSON body succeeds. Terraform provider seems to be sanitizing or altering the payload before sending. Is this a known limitation with nested objects in the provider? Or is there a syntax adjustment required for the definition attribute?