How do I correctly to manage conflicting data retention policies for conversation analytics when deploying via Terraform?
- Current environment details:
- Provider: genesyscloud/genesyscloud 1.46.1
- Region: AU1
- Module: custom analytics reporting pipeline
- The
genesyscloud_routing_queueresource includes aconversation_serviceblock. - Attempting to set
analytics_reporting_enabled = truetriggers a conflict with existing global retention settings. - Terraform apply fails with error code 409 Conflict.
- Error message: “Resource already exists with different retention configuration. Manual intervention required.”
- This breaks the automated CI/CD pipeline using GitHub Actions.
- Goal: Enforce specific retention periods for compliance without manual UI edits.
- Tried using
ignore_changesin the resource block. - Result: Deployment succeeds, but analytics data is not retained as expected.
- Data disappears after 7 days instead of the configured 90 days.
- Tried calling the Analytics API directly via
genesyscloud_apiresource. - Endpoint:
/api/v2/analytics/reports/conversations/summary - Result: 403 Forbidden. Permissions seem correct in the UI, but the service account lacks implicit access.
- Relevant Terraform snippet:
resource "genesyscloud_routing_queue" "main" {
name = "SupportQueue"
conversation_service {
analytics_reporting_enabled = true
# retention_policy_id = "hardcoded-id" # Tried this, still fails
}
}
- The
genesyscloud_analytics_reportresource does not expose retention settings. - Documentation suggests using
genesyscloud_platform_org_settings. - Tested this resource.
- No attribute for
conversation_retention_days. - Is there a hidden API endpoint or a specific provider attribute to link queue analytics to org-level retention?
- Need a pure IaC solution. No manual steps.
- Urgent. Compliance audit next week.
- Any workarounds using
genesyscloud_architect_flowto route data differently?