The terraform plan consistently fails when attempting to deploy a Data Action with a parameter override targeting the Genesys Cloud Predictor API. It appears the parameter override isn’t correctly translating the expected data type for the ‘languageCode’ parameter. This is happening specifically within a CI pipeline run against a dedicated testing organization. We’ve established the pipeline is successfully authenticating and can deploy Data Actions without overrides, so the core connectivity isn’t the issue.
The plan output shows the following error - a 400 Bad Request - returned from the Predictor API when attempting to create the Data Action. The API endpoint being called is /api/v3/predictor/languages, and the error message details an invalid type for the ‘languageCode’ parameter, expecting a string but receiving an integer. It’s a bit perplexing because the Terraform configuration explicitly defines this parameter as a string. I suspect an issue with the conversion happening during the plan execution, or perhaps an incorrect API version being negotiated. The Data Action itself is relatively simple; it’s solely for language detection via the Predictor service.
Here’s a summary of the environment and steps taken:
- Terraform version: 1.6.6
- Provider version:
hashicorp/genesyscloud3.2.1 - CI environment: GitHub Actions, Ubuntu-latest runner
- Great Cloud region: EU-West
- Data Action SDK version: v8.5.1.0
- Workflow YAML triggering on pull requests to the ‘main’ branch
- Reproducible in CI, but not locally when applying the same configuration.
- Confirmed the Predictor API endpoint
/api/v3/predictor/languagesis the correct one based on documentation. - Verified that the parameter definition in the Terraform configuration is a string.
resource "genesyscloud_dataaction" "predictor_lang_detect" {
name = "Predictor Language Detect"
description = "Detects language from input text"
type = "http"
api_url = "https://api.genesyscloud.com/api/v3/predictor/languages"
method = "POST"
parameter {
name = "languageCode"
type = "string"
value = "en-US"
}
}
The problem persists despite ensuring the parameter type is correctly defined. I’m questioning if the provider is somehow defaulting to an older API version during the plan stage, causing it to misinterpret the parameter type. The pipeline setup hasn’t been altered recently, which makes this even less obvious.