Genesyscloud_script resource fails with 400 on dynamic prompt mapping

Anyone free to help troubleshoot this deployment failure with agent scripts. Provider v1.22.0 on AU-1 BYOC. The genesyscloud_script resource fails during terraform apply with a 400 Bad Request. The error points to invalid JSON structure in the prompt_text field when referencing local variables.

The HCL defines dynamic text blocks using var.agent_greeting. Locally, the JSON renders valid. But the API rejects it.

Error: Error creating script: 400 Bad Request
{"errors":[{"message":"Invalid prompt text structure at index 2","code":"invalid.request.body"}]}

Genesys Cloud API Docs: “Prompt text must be a flat array of objects. Nested variables for dynamic content are not supported in the initial payload.”

This documentation seems outdated or I am missing a specific formatting requirement for BYOC environments. Standard US-1 deployments work fine with this structure. Is there a known limitation for AU-1 BYOC regarding variable interpolation in script resources?

Current state:

  • Provider: v1.22.0
  • Env: AU-1 BYOC
  • CLI: genesys cloud script validate passes locally

Any insights on how to structure the HCL to bypass this validation?