- Terraform 1.6.0
- Genesys Cloud Provider 1.15.0
- SvelteKit internal dashboard
- Environment: Production US-East
What is the correct way to import an existing Genesys Cloud user into Terraform state without triggering schema validation errors? I am trying to codify my internal status widget’s backend users using CX as Code. The user exists in GC, and I have the ID from the UI.
I ran:
terraform import module.gc_users.genesis_cloud_user.main "user-id-123"
Terraform hangs for a moment, then fails with:
Error: 400 Bad Request
Content: {"errors":[{"code":"bad_request","message":"Validation failed for fields: email"}]}
The user has a valid email in GC. My config looks like this:
resource "genesis_cloud_user" "main" {
email = "[email protected]"
name = "Dev User"
division_id = var.default_division
}
Is the provider not fetching the full resource graph? Do I need to manually set the division_id to match exactly? I checked the API docs for /api/v2/users/{userId} but the import logic seems to strip required fields. This is blocking my migration to infrastructure as code. Help.