imjuanleonard
imjuanleonard

Reputation: 160

Is there a way to see all GCP Unlabelled resource?

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

Answers (3)

Greg Ames
Greg Ames

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

Jenya
Jenya

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

Ruben M
Ruben M

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

Related Questions