Search code examples
pythongoogle-cloud-platformgcloud

In GCP, how can we fetch resources which doesn't have any label?


Is there any way from cli(GCloud or python) to fetch all the resources in compute, cloud composer, GCS bucket, k8s engine, data proc, and AI notebook which doesn't contain any label tags in it. It is required for the audit purpose.


Solution

  • Posting as a Community Wiki as it's based on John Hanley's comments:

    You can use the beta version of the asset command in gcloud, more specifically you could use:

    gcloud beta asset feeds list 
    

    you can find more information on the required flags needed for that command in here.