Stumbled on a weird bug today with predictive routing analytics exports via Terraform. The genesyscloud_analytics_export resource fails during terraform apply with a 403 Forbidden error. This happens specifically when referencing a custom report definition for predictive routing metrics. Standard exports work fine. The issue appears after updating the provider to v1.78.2. Region is APAC Sydney.
Error log:
Error: Error creating Analytics Export: 403 Forbidden
Response body: {"errors":[{"code":"unauthorized","message":"You do not have permission to perform this action."}]}
Configuration snippet:
resource "genesyscloud_analytics_export" "pr_metrics" {
name = "PR Daily Metrics"
type = "report"
definition_id = var.custom_report_id # Reference to custom PR report
export_settings {
format = "CSV"
destination {
type = "s3"
bucket = "my-analytics-bucket"
}
}
schedule {
frequency = "DAILY"
start_time = "06:00"
timezone = "Australia/Sydney"
}
}
The service account has Analytics:Read and Predictive Routing:Read permissions. Verified via GC CLI genesyscloud auth:login. The custom report definition exists and is accessible via UI. Is there a specific permission missing for cross-resource exports in the new provider version? Or is this a known bug with custom report references in genesyscloud_analytics_export?