Genesyscloud_byoc_edge 400 Bad Request - Invalid JSON Payload via Terraform

Stuck on a persistent 400 Bad Request when applying genesyscloud_byoc_edge resource. The error message is generic: “Invalid edge configuration payload”. This is frustrating because the JSON structure matches the OpenAPI spec exactly, and manual creation via the UI works fine.

We are managing BYOC edge configurations across multiple environments (dev, staging, prod) using Terraform. The issue appears only during the initial creation of the edge resource. Updates work fine once the resource exists. This breaks our automated deployment pipeline.

Here is the HCL configuration:

resource "genesyscloud_byoc_edge" "production_edge" {
 name = "prod-byoc-edge-01"
 description = "Primary BYOC Edge for Production"
 
 edge_configuration {
 edge_type = "BYOC"
 
 network_configuration {
 ip_address = "10.0.1.50"
 subnet_mask = "255.255.255.0"
 gateway = "10.0.1.1"
 dns_servers = ["8.8.8.8", "8.8.4.4"]
 }
 
 routing_rules {
 inbound {
 pattern = "^\+61[0-9]+$"
 action = "ACCEPT"
 }
 outbound {
 pattern = "^\+.*$"
 action = "PERMIT"
 }
 }
 
 security_settings {
 tls_enabled = true
 tls_version = "1.2"
 certificate_id = "cert-12345678-1234-1234-1234-123456789012"
 }
 }
}

Environment details:

  • Terraform v1.9.8
  • Genesys Cloud Provider v1.65.0
  • Region: ap-southeast-2 (Sydney)
  • Execution: GitHub Actions self-hosted runner

I have validated the JSON payload using the Genesys Cloud CLI (genesyscloud byoc edge create) and it succeeds. The issue is isolated to the Terraform provider.

Has anyone seen this specific 400 error with BYOC edges? Is there a known issue with the provider’s JSON serialization for this resource? Any workarounds or debugging steps would be appreciated. We need to automate this for compliance reasons.