Quick question about edge deployment via Terraform. We are trying to automate BYOC edge provisioning for our Sydney region. The provider seems to reject the payload consistently during the apply phase.
Environment details:
- Terraform v1.9.8
- Genesys Cloud Provider v1.66.0
- Region: ap-southeast-2
- Error: 400 Bad Request
The error message states Invalid JSON payload. We have validated the JSON against the OpenAPI spec for POST /api/v2/edges. The structure looks correct. The edge_type is set to byoc. The name is unique. The region matches our org.
We are using a data source to fetch the edge_profile id. That part works. The failure happens when creating the edge resource itself.
Here is the HCL block:
data "genesyscloud_edge_profile" "byoc_profile" {
name = "Sydney BYOC Profile"
}
resource "genesyscloud_edge" "sydney_edge" {
name = "Sydney-Prod-Edge-01"
edge_type = "byoc"
region = "ap-southeast-2"
profile_id = data.genesyscloud_edge_profile.byoc_profile.id
status = "active"
metadata {
custom_key = "value"
}
}
And here is the JSON payload we are sending (reconstructed from debug logs):
{
"name": "Sydney-Prod-Edge-01",
"edgeType": "byoc",
"region": "ap-southeast-2",
"profileId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"status": "active",
"metadata": {
"customKey": "value"
}
}
The API returns 400. No specific field is mentioned as invalid. Just generic Invalid JSON payload.
We tried removing the metadata block. Same error.
We tried changing edge_type to managed. Same error.
We tried using a different profile_id from a known working edge. Same error.
Is there a known issue with the genesyscloud_edge resource in provider v1.66.0? Or is the OpenAPI spec for edges outdated? We need to deploy this for our analytics reporting pipeline. The edge needs to be up before we can push custom metrics.
Any advice on debugging this? We are stuck. The provider logs show the request going out. The response comes back 400. No useful details in the response body. Just {"code":"bad.request","message":"Invalid JSON payload"}.
Thanks.