Search code examples
google-cloud-platformgoogle-cloud-loggingaudit-logging

How do I query for GCP ip resources logs by id?


I need to find when and by whom a GCP ip resource was created by using audit logs. I found the necessary parameters for some other resource form here, but I can't find information regarding querying ip logs(I already tried node_id). So how can I get the data I need with the information I have?


Solution

  • I found the correct filter string to get the creation event from logs.

    "resource.type=\"gce_reserved_address\" AND resource.labels.reserved_address_id=\"$resourceId\" AND protoPayload.methodName=\"v1.compute.addresses.insert\""