Outbound Campaign Draft Validation Failing on List ID Reference

I can’t seem to figure out why the outbound campaign resource fails validation during the terraform apply phase. The error indicates that the contact list ID is invalid, yet the same ID works perfectly when used manually in the Genesys Cloud UI or via direct API calls.

The environment is Genesys Cloud EU-West-1. Using provider version 1.25.0. The issue appears specifically when referencing a list created in the same deployment block. If I split the deployment into two separate pipelines, it works. This suggests a propagation delay or a dependency issue within the provider itself.

Here is the relevant HCL snippet:

resource "genesyscloud_outbound_contactlist" "campaign_list" {
 name = "Test Campaign List"
 description = "Auto-generated"
}

resource "genesyscloud_outbound_campaign" "main_campaign" {
 name = "Outbound Test"
 status = "DRAFT"
 list_id = genesyscloud_outbound_contactlist.campaign_list.id
 dial_type = "PREDICTIVE"
}

The error returned is a 400 Bad Request:

Error: Error creating outbound campaign: 400 Bad Request
Validation Error: The contact list ID is invalid or does not exist.

The CLI logs show the list ID is being passed correctly. However, the campaign creation fails immediately after. No retry logic seems to be implemented for this specific validation step in the provider.

Is this a known limitation with the current provider version? Or is there a specific attribute I need to add to force a wait state? The documentation does not mention any explicit dependency requirements for outbound resources other than standard terraform dependencies.

Looking for a workaround that does not involve splitting the pipeline. The current setup breaks the single-source-of-truth principle for our CX-as-Code strategy. Any insights on how to handle this race condition would be appreciated.

Take a look at at the deployment order.

  • Terraform often creates resources in parallel.
  • The campaign tries to validate before the list exists.
  • Add a depends_on clause to force sequence.
  • This prevents 422 errors during load tests.
  • Check the API throughput limits too.