Skip to content

Bucket does not log access

Description

Some resources require a record of who access them and when.

Fix - Buildtime

Terraform

  • Resource: google_storage_bucket
  • Argument: logging/log_bucket to specify a Bucket to store access log in.
resource "google_storage_bucket" "logging" {
  name     = "jgwloggingbucket"
  location = var.location
  uniform_bucket_level_access = true
+  logging {
+    log_bucket = "mylovelybucket"
+  }
}