GitLab Well Architected
Cookbook navigation
Prompts / Implement Data Retention Policies

Implement Data Retention Policies

EnterpriseAutomationComplianceData-MgmtDeveloperGovernBeginner

Automate data lifecycle management per retention policies. Maintain compliance automatically.

For GitLab Duo

prompt

Implement data retention for [DATA TYPE]:

Policy:
- Retain for: [DURATION]
- Archive after: [DURATION]
- Delete after: [DURATION]

Implement:
1. Automated cleanup jobs
2. Archival process
3. Audit logging
4. Recovery procedures
5. Compliance reporting

Use the prompt

Provide the agreed retention rules and identify any exceptions, such as legal holds. Review what a cleanup would select before allowing it to delete data.