Agent Script 400 Bad Request via Terraform - Invalid JSON Payload

Quick question, has anyone seen this weird error? with genesyscloud_script resource. Pushing HCL returns 400 Bad Request with Invalid script payload. JSON matches OpenAPI spec.

Context:
Terraform v1.9.8
Provider v1.65.0
Region: ap-southeast-2

Steps to reproduce:

  1. Define script with basic text block and metadata.
  2. Run terraform apply.
  3. Provider sends POST to /api/v2/flows/scripts.
  4. API rejects payload with 400.

HCL snippet:

resource "genesyscloud_script" "test_script" {
 name = "Test Script"
 description = "Auto generated"
 
 script {
 type = "text"
 content = "Hello world"
 }
}

Error log:

Error: Post "https://api.us.genesys.cloud/api/v2/flows/scripts": 400 Bad Request
Body: {"errors":[{"code":"invalid.request","message":"Invalid script payload"}]}

Checked API docs. Structure seems correct. Same config works in UI. Suspect provider serialization issue with nested blocks. Any workaround?