Forseti Inventory collects and stores information about your Google Cloud Platform (GCP) resources. Inventory data is transformed to a data model that Forseti Scanner and Explain use to perform their operations.
Before you start using Inventory, make sure that Inventory is configured and the proper GCP and G Suite access is set up for your Forseti GCP service account.
To display Inventory flag options, run forseti inventory -h
.
To start a new inventory process, run the following command:
forseti inventory create
You can track the status by using the list
command.
Because the data model is widely used in Forseti, it can be helpful to create the data model along with the newest inventory.
forseti inventory create --import_as <MODEL_NAME>
To list all of the existing inventories and their statuses, run the following command:
forseti inventory list
To display a summary of an inventory, run the following command:
forseti inventory get <INVENTORY_INDEX_ID>
To get the <INVENTORY_INDEX_ID>
, run the list
command.
To delete an inventory, run the following command:
forseti inventory delete <INVENTORY_INDEX_ID>
To delete all inventories that are older than a specific date, run the following command:
forseti inventory purge <RETENTION_DAY>
Note that <RETENTION_DAY>
is the number of days to retain the data. If you don’t specify
a value, then the value in forseti_config.yaml
will be used.