How to find out who created a GCP project

google-cloud-platform

Our GCP organization is a mess. I want to organize projects into folders, and delete "abandoned" projects. How can I find out who created a given GCP project?

Best Answer

Provided that the project was created less than 400 days ago, you can find the project's creator via Stackdriver Logging. This command can quickly look up that information:

gcloud logging read --project [PROJECT] \
  --order=asc --limit=1 \
  --format='table(protoPayload.methodName, protoPayload.authenticationInfo.principalEmail)'

This should give output like:

METHOD_NAME    PRINCIPAL_EMAIL
CreateProject  user@domain.com

If METHOD_NAME is not CreateProject, then something went wrong (most likely the project was created more than 400 days ago) and you should ignore PRINCIPAL_EMAIL.

Related Topic