Reputation: 160
My goal is to see all the unlabelled inventory so I can label them correctly and show it in cost tracking
Upvotes: 0
Views: 1670
Reputation: 1
Did not work for my on a Mac:
cloud compute instances list --filter=-labels:*
Did work for my on a Mac:
gcloud compute instances list --filter="-labels:*"
Upvotes: 0
Reputation: 1
To show all unlabeled resources you can use filter in gcloud command,
For example for show all unlabeled disks
gcloud compute disks list --filter=-labels:*
For compute instances use:
cloud compute instances list --filter=-labels:*
Upvotes: 0
Reputation: 89
Adding labels to all resources automatically is not possible, nevertheless, as other comment suggests, you could try to use Asset inventory for this purpose. You can also export this to a GCP bucket.
Upvotes: 1