Could use a hand troubleshooting this deployment failure in our CI/CD pipeline.
Context:
Running Terraform v1.7.4 with Genesys Cloud Provider v1.92.0. Environment is Prod (US East). The goal is to automate the creation of a Data Connector for AWS S3 to ingest call recordings for compliance archiving. The GitHub Actions workflow uses a service account with admin:admin and analytics:report:export scopes.
The deployment succeeds for the initial configuration but fails when applying the specific S3 bucket permissions via the genesyscloud_data_connector resource. The state file shows the resource was created, but the subsequent apply step throws a 403 error.
Error snippet:
Error: Error updating Data Connector "compliance-s3-connector": PUT https://api.mypurecloud.com/api/v2/analytics/dataconnectors/abc-123: 403 Forbidden
Response body: {"message":"Insufficient permissions to modify connector configuration"}
I have verified the OAuth token validity using genesyscloud auth login and the token is active. The service account has integration:integration:admin role. Interestingly, creating the same connector manually via the UI works without issue. The Terraform plan shows no changes to the type or destination fields, only a drift in the config JSON structure related to the S3 IAM role ARN.
HCL snippet:
resource "genesyscloud_data_connector" "s3_compliance" {
enabled = true
name = "compliance-s3-connector"
type = "S3"
config = jsonencode({
bucketName = "my-bpo-archives"
region = "us-east-1"
roleArn = "arn:aws:iam::123456789:role/gc-integration-role"
})
}
Question:
Is there a known limitation with the genesyscloud_data_connector resource regarding IAM role validation during the apply phase? Or does the provider require an additional scope like data:connector:write that is not documented? The 403 seems to originate from the backend API rather than the CLI itself.