Reputation: 529
I'm trying to list of the resources assigned to aGoogle Cloud Project using CLI
When I run the following command:
gcloud asset search-all-resources --scope=projects/projtest
it return an error:
ERROR: (gcloud.asset.search-all-resources) INVALID_ARGUMENT: Project 'project:xxx-backup-342714' not found or deleted.
- '@type': type.googleapis.com/google.rpc.ErrorInfo
domain: googleapis.com
metadata:
consumer: projects/xxx-backup-342714
service: cloudasset.googleapis.com
reason: USER_PROJECT_DENIED
If I remember well I removed the xxx-backup-342714 from the Google Cloude Console but i'm not sure of that. Anyway how I can solve this issue and list the resources?
Upvotes: 0
Views: 280
Reputation: 106
Run gcloud config list
to list your current account and project and make sure your account has permissions to your project xxx-backup-342714
For detailed issue, try running
gcloud asset search-all-resources --scope=projects/<PROJECT> --verbosity debug
Also make sure API [cloudasset.googleapis.com]
is enabled for your project
Upvotes: 1