Does anyone understand why the genesyscloud_script resource rejects valid HCL when referencing external variables for prompt text?
Running provider v1.22.0 on AU-1 BYOC. The deployment pipeline (GitHub Actions) pushes the config, but terraform apply fails immediately.
Error log:
Error: Error creating Script: 400 Bad Request
Body: {"errors":[{"code":"invalid_request_body","message":"Prompt text cannot be empty or null","context":"prompt_12345"}]}
The HCL block looks standard:
resource "genesyscloud_script" "main_script" {
name = "Agent Onboarding - ${var.region}"
description = "Auto-generated via IaC"
prompt {
id = "prompt_12345"
type = "TEXT"
title = "Welcome Message"
# This variable is definitely populated in the env
text = var.welcome_text
}
}
var.welcome_text is defined in terraform.tfvars and contains a simple string. Debugging with terraform console confirms the variable resolves correctly.
Manual creation in the UI works instantly. Copying the exact JSON from the API response and pasting it into the HCL text field works. But using the variable reference breaks it.
Is there a known issue with string interpolation inside script prompts in this provider version? Or is the API endpoint /api/v2/scripts rejecting dynamic values during the initial POST?
Checked the release notes for v1.22.0. No mention of script variable handling.
Environment details:
- Provider:
genesys/genesyscloud v1.22.0 - Terraform:
1.6.5 - Region:
AU-1 - BYOC:
True
Need a workaround. Hardcoding strings is not an option for our multi-env setup. Appreciate any insights on the underlying API constraint here.