Skip to content

Commit fdcb7ac

Browse files
[CI] Disable Soft Delete on GCS Buckets
This patch disable soft deletion on the GCS Buckets used to cache object files. Soft deletion is a feature on GCS buckets where when files are deleted they are kept around for some duration of time (~7 days by default) in a "soft" deleted state before being fully deleted. Given we do not really lose anything by deleting object files and can easily regenerate them, it does not make sense to pay for storing them for an additional seven days. By the end of the time they will be long outdated. Reviewers: dschuff, cmtice, lnihlen, gburgessiv, Keenuts Reviewed By: cmtice Pull Request: #518
1 parent 32859ca commit fdcb7ac

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

premerge/gke_cluster/main.tf

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,10 @@ resource "google_storage_bucket" "object_cache_linux" {
171171

172172
uniform_bucket_level_access = true
173173
public_access_prevention = "enforced"
174+
175+
soft_delete_policy {
176+
retention_duration_seconds = 0
177+
}
174178
}
175179

176180
resource "google_storage_bucket" "object_cache_windows" {
@@ -179,6 +183,10 @@ resource "google_storage_bucket" "object_cache_windows" {
179183

180184
uniform_bucket_level_access = true
181185
public_access_prevention = "enforced"
186+
187+
soft_delete_policy {
188+
retention_duration_seconds = 0
189+
}
182190
}
183191

184192
resource "google_service_account" "object_cache_linux_gsa" {

0 commit comments

Comments
 (0)