查找GCP平台的项目,存储桶,计算实例详细信息

时间:2018-12-29 12:29:07

标签: google-cloud-platform

我们如何以编程方式找到有关GCP基础架构的详细信息,例如各种文件夹,项目,计算实例,数据集等,从而有助于更好地了解GCP平台。

此致

Neeraj

2 个答案:

答案 0 :(得分:3)

GCP中有一项名为Cloud Asset Inventory的服务,它是Resource Manager的一部分。 Cloud Asset Inventory是一项存储服务,保留了五周的Google Cloud Platform(GCP)资产元数据历史记录。它允许您在特定的时间戳或时间范围导出所有资产元数据。

它支持多种资源类型,包括:

资源管理器

  • google.cloud.resourcemanager.Organization

  • google.cloud.resourcemanager.Folder

  • google.cloud.resourcemanager.Project

计算引擎

  • google.compute.Autoscaler

  • google.compute.BackendBucket

  • google.compute.BackendService

  • google.compute.Disk

  • google.compute.Firewall

  • google.compute.HealthCheck

  • google.compute.Image

  • google.compute.Instance

  • google.compute.InstanceGroup

...

云存储

  • google.cloud.storage.Bucket

BigQuery

  • google.cloud.bigquery.Dataset

  • google.cloud.bigquery.Table

完整列表在其文档https://cloud.google.com/resource-manager/docs/cloud-asset-inventory/overview#supported_resource_types

AWS中的等效服务称为AWS Config

答案 1 :(得分:0)

我发现了名为“ forseti Security”的开源工具,该工具易于安装和使用。它包含5个主要组成部分。

Inventory : Regularly collects the data from GCP and store the results in cloudSQL under the table “gcp_inventory”. In order to refer to the latest inventory information you can refer to the max value of column : inventory_index_id.

Scanner : It periodically compares the policies applied on GCP resources with the data collected from Inventory. It stores the scanner information in table “scanner_index”

Explain : it helps to manage the cloud IAM policies.

Enforcer : This component use Google Cloud API to enforce the policies you have set in GCP platform.

Notifier : It helps to send notifications to Slack, Cloud Storage or SendGrid as show in Architecture diagram above.

您可以找到官方文档here

我尝试使用此工具,发现它确实很有用。

相关问题