I need to generate inventory for all my GCP
resources. For this I can go through each of the components like VPC , Compute Engines , IAM
and generate the inventory manually . I am looking for some tool like gcloud
or using automation software like terraform/ansible
to generate the inventory. Any suggestions ?
Yes, you can use Cloud Asset Inventory for this.
Here is a link to the quickstart guide.
My Cloud Shell was already properly configured so I only had to run:
gcloud beta asset search-all-resources
Enable the API if asked when running the above command.