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?