First run succeeds. Second run, with no changes to HCL, fails.
Error: PUT https://api.c.pure.cloud/api/v2/organization/webrtc/softphone/config: 409 Conflict
Body: {"errors":[{"code":"conflict","message":"Resource already exists or is locked"}]}
Checked the API docs. No id argument on this resource. It seems to be a singleton. The provider might be trying to create a new instance instead of updating the existing one.
Is this a known issue with the singleton handling in the provider? Or is there a specific lifecycle block needed to force an update? Manual API calls work fine. The issue is strictly in the IaC pipeline. Need a stable state for CI/CD.
check your resource naming convention in that terraform block. the genesyscloud_webrtc_softphone_config resource is a singleton in the platform, meaning there can only be one instance per organization. if you have manually created this config in the admin console previously, or if another state file has already provisioned it, terraform will throw a 409 conflict because it cannot create a duplicate.
try importing the existing resource into your state first. run terraform import genesyscloud_webrtc_softphone_config.main <resource_id> to sync the state. also, make sure you are not running parallel applies against the same org. from my experience with schedule publishing spikes, concurrent writes to system configs often cause these conflicts. if the import works, your next apply should just plan a no-op or an update, rather than trying to create. watch out for timezone mismatches if you are adding any schedule-related metadata later, though for pure web rtc config, the conflict is almost always about that singleton constraint.