Skip to content

Instantly share code, notes, and snippets.

View Joey012345's full-sized avatar
🏠
Working from home

Joey Zhou Joey012345

🏠
Working from home
View GitHub Profile
@Joey012345
Joey012345 / gcp-audit-log-sink-bigquery-gcloud.sh
Created November 15, 2022 20:05 — forked from mikesparr/gcp-audit-log-sink-bigquery-gcloud.sh
Example setting up aggregate log sink for Audit Logs on Google Cloud Platform (GCP) shipping to BigQuery
#!/usr/bin/env bash
#####################################################################
# REFERENCES
# - https://cloud.google.com/logging/docs/export/aggregated_sinks
# - https://cloud.google.com/bigquery/docs/datasets#bq
# - https://cloud.google.com/bigquery/docs/access-control-basic-roles
#####################################################################
export PROJECT_ID=$(gcloud config get-value project)