-
Notifications
You must be signed in to change notification settings - Fork 429
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CloudSQL - Old backups are never deleted #519
Comments
This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days |
@Silvest89 can you plz create an issue for the API team. This is not something we can fix it in module. |
@imrannayer
This operation supports an argument that specifies the maximum amount of backups returned with it's default page size being 20 if left unset. We worked around this now by using this exact backup.yaml template but simply passing in a 2 possible ways of fixing this within the module are:
|
@tjespers option 2 sounds like a better option. |
This commit introduces a new module variable: backup_runs_list_max_results this variable is used to control the maximum amount of results that are returned by the googleapis.sqladmin.v1.backupRuns.list API call. By defaul this call only returns 20 results leading to a situation where no old backups will be deleted whenever the desired amount of retained backups exceed this number. Fixes: terraform-google-modules#519
This commit introduces a new module variable: backup_runs_list_max_results this variable is used to control the maximum amount of results that are returned by the googleapis.sqladmin.v1.backupRuns.list API call. By defaul this call only returns 20 results leading to a situation where no old backups will be deleted whenever the desired amount of retained backups exceed this number. Fixes: terraform-google-modules#519
@imrannayer Sure thing! I've opened #566 as a bugfix for this. |
This commit introduces a new module variable: backup_runs_list_max_results this variable is used to control the maximum amount of results that are returned by the googleapis.sqladmin.v1.backupRuns.list API call. By defaul this call only returns 20 results leading to a situation where no old backups will be deleted whenever the desired amount of retained backups exceed this number. Fixes: terraform-google-modules#519
TL;DR
We do multiple CloudSQL backups a day so that's how we came across this issue (using just a 7 day retention time). Old backups won't get deleted.
By default googleapis.sqladmin.v1.backupRuns.list returns only 20 items. So if for example doing daily backups and you have a retention time higher than 21, you will never get the backups old enough to be deleted :P
It would be nice to
Expected behavior
Old backups should be deleted
Observed behavior
Backups higher than retentionTime are not visible in the list response
Terraform Configuration
.
Terraform Version
.
Additional information
No response
The text was updated successfully, but these errors were encountered: