Predictive Routing Campaign Drift in Terraform Refresh

Can anyone explain why the genesyscloud_routing_outbound_campaign resource shows perpetual drift on the call_type_id attribute? The API returns the ID correctly, but the next terraform plan detects a change even when the HCL is static. This happens specifically with BYOC trunks in the APAC region.

The environment is:

  • Provider: genesyscloud/genesyscloud v1.32.0
  • Terraform: v1.6.5
  • Region: us-east-1 (tenant hosted), Campaign targets ap-southeast-2 via BYOC.

Snippet:

resource "genesyscloud_routing_outbound_campaign" "drift_test" {
 name = "APAC-Dial-Test"
 status = "RUNNABLE"
 call_type_id = var.call_type_id
 trunk_id = var.byoc_trunk_id
 dialing_frequency = "ONCE"
}

Error during apply:

Error: Provider produced inconsistent result after apply
When applying changes to genesyscloud_routing_outbound_campaign.drift_test, provider "module.genesys[0].provider["registry.terraform.io/genesyscloud/genesyscloud"]" produced an unexpected new value: was null, but now
known.

The call_type_id is not null in the state file. It seems the SDK or API returns an empty string or null for certain BYOC configurations, causing the diff. Is this a known limitation with cross-region predictive routing definitions? Need to suppress this diff or fix the provider logic.

Check your provider configuration for the specific API endpoint being used for the APAC region, as the default genesyscloud provider often defaults to US endpoints unless explicitly overridden. The drift you are seeing with the call_type_id is likely caused by a mismatch in how the Terraform provider resolves the resource ID versus the actual API response format for BYOC trunks in that specific region. In our experience building Premium Apps that interact with multi-org environments, this discrepancy frequently stems from the provider caching the US-based schema while the APAC instance returns a slightly different payload structure for outbound campaigns. Ensure you are setting base_url in your provider block to point directly to the APAC cluster. Additionally, verify that the call_type_id in your HCL matches the exact UUID returned by the GET /api/v2/outbound/campaigns/{campaignId} endpoint, including any trailing whitespace or formatting differences that might not be visible in the plan output. Running terraform refresh after correcting the provider URL usually resolves this phantom drift.