Noticed a weird symptom where the 02:30 JST sync pipeline’s doing jack all again after the carrier gateway swap. Terraform 1.9.11 paired with nice-cxone 1.22.1 throws a 409 Conflict on nice_cxone_sip_trunk when pushing the registration_timeout block. Cleared the state backup, ran tf plan, and verified the /api/v2/telephony/sip/trunk endpoint. The payload matches the docs exactly, but the platform’s still rejecting the field with a malformed schema error. Kicked the staging SIP trunk offline for three hours while the upstream carrier timed out.
Tried downgrading to provider 1.21.8. Same 409. State drift isn’t the issue here. The local state file matches the remote exactly before the apply. Switched to the raw REST API via Postman. The endpoint accepts the JSON without complaints. Firewall rules allow outbound 443 and 5060-5061. Terraform’s provider wrapper must be serializing the nested sip_credentials block incorrectly. Checked the debug logs. The request body shows the timeout value getting cast to a string instead of an integer.
Network latency to the Tokyo edge cluster is sitting at 12ms, so it’s not a transport timeout. The conflict only fires during the PUT operation. Re-ran tf apply with TF_LOG=TRACE to catch the exact serialization step. The HCL block defines the value as a number, but the JSON encoder drops it to a string somewhere in the client layer. Not sure if this is a known regression in the 1.22.x release cycle or if the platform updated their validator without notice. Debug trace attached below:
2024-05-22T02:31:14.892Z [DEBUG] provider: PUT /api/v2/telephony/sip/trunk/8f3a2c1d-4b9e-4a21-8c7f-9d0e1f2a3b4c
Payload: {"registration_timeout_ms": "30000", "sip_credentials": [{"username": "trunk_01", "password": "****"}]}
Response: 409 Conflict - Field registration_timeout_ms must be of type integer