So I’m seeing a very odd bug with the genesyscloud_ai_vocabulary resource in our Terraform module. We are managing custom NLU vocabulary sets for a multi-tenant bot deployment. The issue triggers during the CI/CD pipeline when GitHub Actions attempts to apply changes to three distinct vocabulary resources in parallel.
Environment details:
- Provider:
genesys/cloudv1.38.0 - Runtime: GitHub Actions
ubuntu-latestwithactions/setup-terraform@v3 - Region: ap-southeast-2 (Sydney)
- Terraform version: 1.6.4
The deployment script splits the vocabulary updates into separate workspaces to avoid lock conflicts, but the API layer seems to reject simultaneous writes to the same ai:nlu:bot context. One of the runs fails consistently with a 422 Unprocessable Entity error, while the others succeed. Retrying the failed job manually works fine, suggesting a race condition or a missing idempotency key in the provider implementation for this specific resource type.
Error: updating Genesys Cloud AI Vocabulary (id: voc-99887766-5544-3322-1100-aabbccddeeff): 422 Unprocessable Entity. Body: {"errors":[{"code":"concurrent_modification","message":"Vocabulary entry 'user_greeting_variants' is currently being modified by another process."}]}
The ai_vocabulary resource configuration:
resource "genesyscloud_ai_vocabulary" "main" {
bot_id = var.bot_id
name = "custom_greetings"
language_code = "en-US"
entries {
name = "user_greeting_variants"
words = ["hey", "hello", "hi there"]
}
}
Is there a known workaround for handling concurrent updates to AI resources? We are considering adding a depends_on chain to serialize the writes, but that significantly increases our deployment time. Looking for a cleaner solution or confirmation if this is a provider bug needing a GitHub issue.