Logging allows administrators to audit storage bucket use, which is often required by compliance frameworks or industry regulations. For more information on storage logs, see the GCP documentation.
References:
https://cloud.google.com/storage/docs/access-logs
Audit logging is configured in the GCP Console UI, however log delivery is configured using the gsutil command-line or with Terraform. For more information on log delivery, see the GCP access-logs documentation (below).
To configure Audit logging:
In GCP Console -
To configure log delivery:
In Terraform -
References:
https://cloud.google.com/storage/docs/access-logs
https://cloud.google.com/storage/docs/audit-logging
https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/storage_bucket#nested_logging