Quick question, has anyone seen this weird error? with deploying a custom Data Action using the Genesys Cloud Terraform provider. The deployment fails consistently during the apply phase in the au-1 region. Provider version is v1.68.4. The HCL validates locally without errors, but the API rejects the request with a 400 Bad Request. Specifically, the error points to the body_template field being malformed, even though the JSON structure matches the OpenAPI spec exactly.
resource “genesyscloud_dataaction” “my_action” {
name = “test_action”
description = “Test data action”
status = “published”
body_template = jsonencode({
“method” = “POST”
“url” = “https://example.com/api”
“headers” = {
“Content-Type” = “application/json”
}
“body” = “{}”
})
}
The error response from the API is generic: Error: 400 Bad Request - Invalid request body. I have tried escaping the JSON string, using raw strings, and even simplifying the template to just {}. The GC CLI can create this resource without issue using the same JSON payload. It seems the Terraform provider is sending the data in a way that the API does not expect. Any ideas on how to format the body_template correctly for the provider?