gcp: events are not consistent for resource type. "operation" is missing for buckets

Viewed 48

According to following GCP link standards event structure in json should have operation details. But found that for storage bucket operation entry is missing in log to identify it as last action occurred.

"operation": {
    object (LogEntryOperation)
  }

Other resource.type = firewall rule

"operation": {
    "id": "operation-xxxxxxxxxxxxxxxxxxxxxx",
    "producer": "compute.googleapis.com",
    "last": true
  }

How to get operation details as mandatory object to be received in events? If GCP doesn't support operation:{} in events consistently any evidence would be helpful.

1 Answers

"last" is an optional field and may not be populated. This cannot be enforced.
You can try enabling bucket logging to gather more information about events regarding your storage or create a Feature Request at Public Issue Tracker to have this option added in future.

Related