Terraform Outbound Campaign fails 409 on DNC list reference

Environment specs:

  • Genesys Cloud Terraform Provider v2.1.0
  • Outbound Campaign API v2
  • Environment: Production (US East)
  • Terraform Version: 1.5.7

Why does this setting cause a conflict during automated deployment?

Attempting to provision a new Outbound Campaign via Terraform. The pipeline fails on the genesyscloud_outbound_campaign resource with a 409 Conflict error. The error message indicates: Campaign 'Campaign-AUS-01' already exists or has a conflicting DNC list reference.

The campaign does not exist in the environment. A prior genesys cloud outbound:campaign:get --id <id> returns 404 Not Found. However, the DNC list (genesyscloud_outbound_dnclist) referenced in the campaign config exists and is active. The Terraform state file shows the DNC list as managed, but the campaign resource is new.

Relevant HCL snippet:

resource "genesyscloud_outbound_dnclist" "aus_dnc" {
 name = "AU_DNC_List"
 description = "Australia DNC List"
}

resource "genesyscloud_outbound_campaign" "aus_campaign" {
 name = "Campaign-AUS-01"
 description = "Test Campaign"
 dial_mode = "PREDICTIVE"
 
 contact_list {
 id = genesyscloud_outbound_contactlist.aus_contacts.id
 }
 
 dnclist {
 id = genesyscloud_outbound_dnclist.aus_dnc.id
 }
}

The CLI command genesys cloud outbound:campaign:create with the same JSON payload works correctly. The Terraform provider seems to be making an extra API call or checking a constraint that the CLI bypasses. Is there a specific attribute required to force the DNC list association in the provider? Or is this a known bug in v2.1.0 regarding DNC list validation during campaign creation?

Logs show the provider sends a PUT request to /api/v2/outbound/campaigns/<id> before the campaign is fully created, which seems incorrect for a new resource. Expected behavior is a POST. Any workaround or patch version recommendation?

Yep, this is a known issue… When migrating from Zendesk, we often assume campaign structures map directly, but Genesys Cloud handles DNC lists with strict dependency chains. The 409 conflict usually means the DNC list resource is still initializing or hasn’t fully propagated across the cluster before the campaign resource attempts to reference it. In Zendesk, tags are global and immediate, but here, the outbound campaign needs a stable UUID. Try adding a depends_on block in your Terraform configuration pointing explicitly to the genesyscloud_outbound_dnclist resource. This forces Terraform to wait until the list is fully provisioned and available in the API before attempting to link it to the campaign. It’s a small adjustment, but it prevents the race condition that causes this conflict during deployment.