│ Error: mismatch on attribute

Hi Team,

We are facing following issue while running the cx as code

│ Error: mismatch on attribute routing_skills.887031174.proficiency:
│ expected value:
│ actual value: 4
**│ **
│ with genesyscloud_user.abc,
│ on users.tf.json line 1, in resource.genesyscloud_user.abc.routing_utilization:


│ Error: mismatch on attribute routing_languages.1380621856.proficiency:
│ expected value:
│ actual value: 5
**│ **
│ with genesyscloud_user.def,
│ on users.tf.json line 1, in resource.genesyscloud_user.def.routing_utilization:


│ Error: mismatch on attribute routing_skills.3614319409.proficiency:
│ expected value:
│ actual value: 3
**│ **
│ with genesyscloud_user.xyz,
│ on users.tf.json line 1, in resource.genesyscloud_user.xyz.routing_utilization:

Any insights to this??

Regards,
Manju

Hi @ManjuR

I was able to recreate the issue you're seeing. I believe it stems from the fact that when you remove all routing_skills blocks from a user resource, Terraform fails to detect this change and perform the delete operations as it should. These inconsistencies between the Terraform configuration and the values stored in the API are causing the error messages you're seeing i.e. TF expected this value to be nil, but read 4 from the API.

We will create a ticket to resolve the core issue relating Terraform not deleting routing skills as it should. In the meantime, you can choose not to fail the terraform deployment based on these inconsistencies by setting the following environment variable to any value: BYPASS_CONSISTENCY_CHECKER. This will prevent the provider from failing, but if it is not too much work, you may want to examine the differences between the relevant user routing skills in your local TF config and in Genesys Cloud.

Hope this helps,
-Charlie

(Tracking with DEVTOOLING-1055)

Hi @ManjuR

There is an existing terraform limitation , where it is unable to detect in the plan when a list/set attribute is removed completely from a resource.
In order to overcome this problem , you can send in an empty array instead.
routing_skills = []
This will make sure routing skills are removed from an existing resource.
Hope this helps.

Thanks
Hemanth