Terraform import fails because of incorrect phone numbers format

Using Terraform I try to export configuration from one org and apply it to another one. Export goes well - the genesyscloud.tf.json file is generated w/o any errors, but the import fails because of incorrect phone number format for Locations and Users:

│ Error: Failed to parse number in an E164 format. Passed +48 600 XXX XXX and expected: +48600XXXXXX

│ with genesyscloud_location.Dariusz_Test_3939338301,
│ on input.tf.json line 115, in resource.genesyscloud_location.Dariusz_Test_3939338301.emergency_number[0]:
│ 115: "number": "+48 600 XXX XXX”,

Object from the exported TF file:

  "Dariusz_Test_3939338301": {
    "address": [
      {
        "city": "City",
        "country": "PL",
        "state": "State",
        "street1": "Address 1",
        "street2": "Address 2",
        "zip_code": "00-100"
      }
    ],
    "emergency_number": [
      {
        "number": "+48 600 XXX XXX”,
        "type": "default"
      }
    ],
    "name": "Dariusz Test",
    "notes": null,
    "path": null
  },

Output of the same location object from the platform API:

{
"id": "28275173-961e-4f15-8547-29b99d8f9d06",
"name": "Dariusz Test",
"emergencyNumber": {
"e164": "+48600XXXXXX”,
"number": "+48 600 XXX XXX”,
"type": "default"
},
"address": {
"city": "City",
"country": "PL",
"countryName": "Poland",
"state": "State",
"street1": "Address 1",
"street2": "Address 2",
"zipcode": "00-100"
},
"state": "active",
"version": 2,
"addressVerified": false,
"selfUri": "/api/v2/locations/28275173-961e-4f15-8547-29b99d8f9d06"
}

It looks that exported phone numbers are taken from the ‘number’ field but import expects the ‘e164’ format.

Any ideas how to solve this?

my export configuration tf.json:

{
"terraform":{
"required_version":"~> 1.4.2",
"required_providers":{
"genesyscloud":{
"source":"mypurecloud/genesyscloud",
"version":"~> 1.14.0"
}
}
},
"provider":{
"genesyscloud":{
"oauthclient_id":"${var.TF_VAR_ID}",
"oauthclient_secret":"${var.TF_VAR_SECRET}",
"aws_region":"${var.TF_VAR_REGION}"
}
},
"variable":[
{
"TF_VAR_ID":{
"type":"string"
}
},
{
"TF_VAR_SECRET":{
"type":"string"
}
},
{
"TF_VAR_REGION":{
"type":"string"
}
}
],
"resource":{
"genesyscloud_tf_export":{
"export":{
"directory":"./export",
"resource_types":[
"genesyscloud_user",
"genesyscloud_auth_division",
"genesyscloud_routing_skill",
"genesyscloud_routing_language",
"genesyscloud_location"
],
"include_state_file":false
}
}
}
}

Import configuration tf:

terraform {
required_version = "~> 1.4.2"
}

variable "TF_VAR_ID" {
type = string
}

variable "TF_VAR_SECRET" {
type = string
}

variable "TF_VAR_REGION" {
type = string
}

provider "genesyscloud" {
oauthclient_id = var.TF_VAR_ID
oauthclient_secret = var.TF_VAR_SECRET
aws_region = var.TF_VAR_REGION
}

Thanks!

Hey @Dariusz, did you find any solution to solve this problem?
I am stuck at the same problem with wrong number format.

Thanks!