File tree Expand file tree Collapse file tree 1 file changed +34
-0
lines changed Expand file tree Collapse file tree 1 file changed +34
-0
lines changed Original file line number Diff line number Diff line change @@ -255,6 +255,27 @@ resource "google_storage_bucket" "object_cache_linux" {
255255 }
256256}
257257
258+ resource "google_storage_bucket" "object_cache_linux_bazel" {
259+ name = format (" %s-object-cache-linux-bazel" , var. cluster_name )
260+ location = var. gcs_bucket_location
261+
262+ uniform_bucket_level_access = true
263+ public_access_prevention = " enforced"
264+
265+ soft_delete_policy {
266+ retention_duration_seconds = 0
267+ }
268+
269+ lifecycle_rule {
270+ action {
271+ type = " Delete"
272+ }
273+ condition {
274+ age = 7
275+ }
276+ }
277+ }
278+
258279resource "google_storage_bucket" "object_cache_windows" {
259280 name = format (" %s-object-cache-windows" , var. cluster_name )
260281 location = var. gcs_bucket_location
@@ -310,6 +331,19 @@ resource "google_storage_bucket_iam_binding" "linux_bucket_binding" {
310331 ]
311332}
312333
334+ resource "google_storage_bucket_iam_binding" "linux_bucket_bazel_binding" {
335+ bucket = google_storage_bucket. object_cache_linux_bazel . name
336+ role = " roles/storage.objectUser"
337+ members = [
338+ format (" serviceAccount:%s" , google_service_account. object_cache_linux_gsa . email ),
339+ ]
340+
341+ depends_on = [
342+ google_storage_bucket . object_cache_linux_bazel ,
343+ google_service_account . object_cache_linux_gsa ,
344+ ]
345+ }
346+
313347resource "google_storage_bucket_iam_binding" "windows_bucket_binding" {
314348 bucket = google_storage_bucket. object_cache_windows . name
315349 role = " roles/storage.objectUser"
You can’t perform that action at this time.
0 commit comments