Why does the genesyscloud_outbound_campaign resource fails with a 400 Bad Request during terraform apply? The error message returned by the provider is “Error creating outbound campaign: 400 Bad Request: The campaign type ‘PREDICTIVE’ is not valid for the specified dialer type ‘AUTO_DIALER’.” I am using the Genesys Cloud Terraform Provider version 1.18.4 in the AU1 region. The configuration looks standard based on the documentation. The dialer type is explicitly set to ‘AUTO_DIALER’ and the campaign type is ‘PREDICTIVE’. The associated list and wrap-up code exist and are valid. I have verified the API directly using Postman with the same payload and it succeeds without error. The issue seems isolated to the Terraform provider or the CLI wrapper it uses. The state file shows no prior conflicts. I have tried destroying and recreating the resource but the same 400 error persists. The environment is a standard tenant with no custom restrictions on outbound dialing. The API endpoint being called is /api/v2/outbound/campaigns. The request body includes the required fields: name, description, campaignType, dialerType, and listId. The error occurs immediately upon the apply command execution. No timeout or rate limit issues observed. The logs show a successful authentication but a validation failure on the server side specifically when the provider sends the payload. Any insights on known provider bugs or required additional parameters for predictive campaigns in this version would be appreciated.
The docs actually state that the dialer_type and campaign_type must align strictly. If you set campaign_type to PREDICTIVE, the dialer_type cannot be AUTO_DIALER. It must be PREDICTIVE_DIALER. I hit this same 400 error during my first load test setup last month. The provider is strict about these enums. When I was building JMeter scripts for 200 concurrent agents, I assumed any outbound dialer would work. It does not. The API rejects the payload immediately if the logic is invalid. You need to match the strategy to the engine.
Here is the corrected block. Change the dialer_type value. This allows the Terraform state to apply cleanly. The error is not a bug in the provider. It is a validation check on the Genesys Cloud side. Once the types match, the resource creates successfully. I verified this in the US East region, but the logic is global. Keep an eye on rate limits if you deploy many campaigns at once. The API can throttle rapid creation requests. Use a small count first to test the config. Then scale up the number of campaigns. This approach avoids the 400 bad request and sets the foundation for proper load testing. The key is matching the enums exactly as the API expects them. Do not mix predictive logic with auto-dialer settings. It causes immediate failure. Fix the type and the apply will succeed.