What is the reason this setting causes a hard failure during the CI/CD pipeline when deploying IVR configurations via Terraform? The genesyscloud_flow resource applies cleanly, but the subsequent genesyscloud_prompt resources attached to the flow nodes fail consistently with a 400 Bad Request. The error payload indicates Invalid audio file format despite the source MP3 files being generated by our pre-deployment script and verified for compliance. Using terraform-provider-genesyscloud v1.0.22 with genesyscloud-cli v1.15.0. The deployment runs in GitHub Actions using the GC_ORG_ID and GC_API_KEY secrets. The prompt resource block looks standard: resource "genesyscloud_prompt" "ivr_welcome" { name = "Welcome Message" description = "Automatically generated" ... }. The API endpoint /api/v2/prompts returns the error immediately upon POST. Checking the raw HTTP request via terraform plan -refresh=false shows the payload structure is correct. However, when the same audio file is uploaded manually via the Genesys Cloud admin console, it succeeds without issue. This suggests a discrepancy between the CLI-based upload mechanism and the web UI handler, or perhaps a transient issue with the media storage service in the us-east-1 region. The logs show no network timeouts, just an immediate rejection. We have tried regenerating the audio files, changing the encoding attribute to mp3 explicitly, and even waiting 10 minutes between prompt creations, but the result is identical. The external_id is unique for each prompt. Is there a known limitation with bulk uploading prompts via the provider when they are referenced by a flow that is also being created in the same apply run? The dependency graph seems correct, with the prompt created before the flow node references it. Any insights into the specific validation rules that differ between the API and the UI would be helpful. The build is blocked until this is resolved.
I’d recommend looking at at the audio codec specification in your Terraform configuration. The Genesys Cloud API often rejects MP3 files that do not strictly adhere to specific sample rate or channel requirements, causing the 400 Bad Request even if the file format appears correct.
Try converting your audio assets to WAV format before the deployment step. This avoids codec negotiation issues during the initial upload phase and aligns with the platform’s preferred ingestion standards for IVR prompts.