Terraform fails on GDPR purge config with 422

Stuck on deploying data retention rules via HCL.

using gc-provider v2.0.8. the POST to /api/v2/gdpr/data-erasure-config returns 422 Unprocessable Entity. payload looks valid per docs but gc cli throws error. any ideas?

resource "genesyscloud_gdpr_data_erasure_config" "main" {
 enabled = true
 data_erasure_type = "ANONYMIZE"
}

Make sure you include the data_erasure_type parameter with the correct casing, as the API is strict about enum values. The provider often fails silently if the payload doesn’t match the exact schema expected by the GDPR endpoint.

Try adding data_erasure_type = "ANONYMIZE" explicitly to the resource block if it isn’t already present, and verify the HCL syntax matches the current provider documentation.

You might want to check at the operational impact before pushing this configuration change, especially given the strict validation errors. While the syntax appears correct, the underlying data erasure process can have significant side effects on reporting integrity.

  • Verify that “ANONYMIZE” aligns with your organization’s specific GDPR compliance requirements, as some regions mandate full deletion rather than anonymization.
  • Check the Performance dashboard for any existing gaps in historical data that might be exacerbated by this change.
  • Ensure that all downstream integrations, such as WEM or external CRM systems, can handle anonymized records without breaking sync processes.
  • Review the provider version compatibility, as v2.0.8 may have known issues with certain GDPR endpoints that newer versions address.

Rushing this deployment without validating these dependencies could lead to data inconsistencies that are difficult to reverse. It is crucial to test in a sandbox environment first to observe how the anonymization affects real-time metrics and historical reports.