Skip to content

Commit

Permalink
audit: add support for logging service
Browse files Browse the repository at this point in the history
  • Loading branch information
spiffxp committed May 26, 2021
1 parent 03768ab commit 055ca92
Showing 1 changed file with 16 additions and 4 deletions.
20 changes: 16 additions & 4 deletions audit/audit-gcp.sh
Original file line number Diff line number Diff line change
Expand Up @@ -291,10 +291,22 @@ function audit_gcp_project_service() {
> "${service_dir}/zones.json"
;;
logging)
echo "TODO: ${service} needs serviceusage.services.use"
##### gcloud logging logs list --format=json > "projects/${project}/services/logging.logs.json"
##### gcloud logging metrics list --format=json > "projects/${project}/services/logging.metrics.json"
##### gcloud logging sinks list --format=json > "projects/${project}/services/logging.sinks.json"
# TODO: does this actually need serviceusage.services.use?
echo "logs"
gcloud logging logs list \
--project="${project}" \
--format=json | format_gcloud_json \
> "${service_dir}/logs.json"
echo "metrics"
gcloud logging metrics list \
--project="${project}" \
--format=json | format_gcloud_json \
> "${service_dir}/metrics.json"
echo "sinks"
gcloud logging sinks list \
--project="${project}" \
--format=json | format_gcloud_json \
> "${service_dir}/sinks.json"
;;
monitoring)
echo "TODO: ${service} needs serviceusage.services.use"
Expand Down

0 comments on commit 055ca92

Please sign in to comment.