Looking for advice on a persistent 409 Conflict error when provisioning SIP trunks via Terraform on our AU-1 BYOC instance.
We are automating the setup of telephony resources using the genesyscloud_edge_sip_trunk resource. The deployment pipeline uses GitHub Actions to push configuration changes to our staging environment. The apply hangs for approximately 30 seconds before failing with a conflict error, even though the resource does not exist in the target environment.
Environment details:
- Provider: genesyscloud 2.5.1
- Terraform: 1.6.0
- Region: AU-1 BYOC
- Resource: genesyscloud_edge_sip_trunk
The error suggests a duplicate external ID or a race condition in the API layer. We have verified that no other processes are running concurrent applies. The API token has full admin privileges and correct scopes for telephony management.
Error output from the CLI:
Error: POST /api/v2/telephony/providers/edges/sip/trunks failed with 409 Conflict
Response: {"errors":[{"code":"duplicate_resource","message":"A resource with this external ID already exists","parameter":"externalId"}]}
We have tried adding a depends_on clause to ensure the parent edge is created first. We also attempted to use a unique UUID for the external_id field in the HCL configuration. Both approaches resulted in the same 409 error. The issue seems specific to the BYOC environment, as the same configuration applies successfully to our US-East standard instance.
Is this a known limitation of the BYOC API endpoints? Or is there a specific workaround for handling external ID conflicts during automated deployments? Any insights into the underlying API behavior would be appreciated. We need to resolve this to maintain our CI/CD pipeline integrity for telephony provisioning.