We bumped the provider to version 1.35.0 last night and the genesyscloud_user resource completely choked on apply. The previous build handled the external_contacts list just fine, but now the schema expects a nested block structure instead of a flat array.
Here is what the config looked like before the update:
resource "genesyscloud_user" "agent_batch" {
for_each = var.agent_list
name = each.value.name
email = each.value.email
external_contacts = ["+442079460001", "+442079460002"]
}
Running terraform plan after the provider update throws a schema validation error that points straight to the external_contacts attribute. The logs say the field is now marked as Type: set with a nested object requirement, which breaks all our existing state files. I tried wrapping the phone numbers in a map structure to match the new docs, but the API just returns a 400 Bad Request when the payload hits the /api/v2/users endpoint during the create action.
The error payload looks like this:
{
"code": "invalid_request",
"message": "External contacts must be specified as a list of objects containing 'address' and 'type' fields",
"status": 400,
"traceId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
}
I’ve been stepping through the provider source to see how the SDK marshals the request. First, the schema definition changed from Type: list to Type: set. Second, the nested object requires both address and type. Third, the state file still holds the old flat array format. When I force that structure into the config, the plan phase passes, but apply still fails with a 409 Conflict. Drift detection gets confused and tries to delete the contacts before recreating them. That triggers a webhook storm in our Studio flows that listen for user profile updates.
Is there a recommended state migration script for this specific schema shift, or do we just have to run terraform state rm and let it rebuild everything from scratch. The documentation for 1.35.0 barely mentions the breaking change. The inline examples in the registry page still show the old array syntax. We’ve got over two hundred agents provisioned through this module, so a full state wipe feels risky. Checking the raw JSON output from terraform show -json confirms the provider is still serializing the old format. Don’t think the SDK is respecting the new schema definition. Ran the validation again. Nothing changed. The SDK is definitely caching the old schema somewhere.