{"id":22671372,"url":"https://github.com/cloudforet-io/plugin-google-cloud-inven-collector","last_synced_at":"2025-09-02T04:09:10.095Z","repository":{"id":61956182,"uuid":"532700849","full_name":"cloudforet-io/plugin-google-cloud-inven-collector","owner":"cloudforet-io","description":"Google Cloud Asset Plugin for SpaceONE Inventory Collector","archived":false,"fork":false,"pushed_at":"2025-08-18T07:21:30.000Z","size":4253,"stargazers_count":11,"open_issues_count":3,"forks_count":13,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-08-25T22:31:18.062Z","etag":null,"topics":["collector","inventory","plugin"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cloudforet-io.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2022-09-05T01:13:30.000Z","updated_at":"2025-04-29T02:15:21.000Z","dependencies_parsed_at":"2023-01-30T05:30:25.251Z","dependency_job_id":"c853b654-4635-4ded-bb8d-45c87ab05434","html_url":"https://github.com/cloudforet-io/plugin-google-cloud-inven-collector","commit_stats":null,"previous_names":[],"tags_count":42,"template":false,"template_full_name":null,"purl":"pkg:github/cloudforet-io/plugin-google-cloud-inven-collector","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloudforet-io%2Fplugin-google-cloud-inven-collector","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloudforet-io%2Fplugin-google-cloud-inven-collector/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloudforet-io%2Fplugin-google-cloud-inven-collector/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloudforet-io%2Fplugin-google-cloud-inven-collector/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cloudforet-io","download_url":"https://codeload.github.com/cloudforet-io/plugin-google-cloud-inven-collector/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloudforet-io%2Fplugin-google-cloud-inven-collector/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273228099,"owners_count":25067722,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-02T02:00:09.530Z","response_time":77,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["collector","inventory","plugin"],"created_at":"2024-12-09T16:14:44.141Z","updated_at":"2025-09-02T04:09:10.079Z","avatar_url":"https://github.com/cloudforet-io.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003eGoogle Cloud Collector\u003c/h1\u003e  \n\n\u003cbr/\u003e  \n\u003cdiv align=\"center\" style=\"display:flex;\"\u003e  \n  \u003cimg width=\"245\" src=\"https://spaceone-custom-assets.s3.ap-northeast-2.amazonaws.com/console-assets/icons/cloud-services/google_cloud/Google_Cloud.svg\"\u003e\n  \u003cp\u003e \n    \u003cbr\u003e\n    \u003cimg alt=\"Version\"  src=\"https://img.shields.io/badge/version-0.5.2-blue.svg?cacheSeconds=2592000\"  /\u003e    \n    \u003ca href=\"https://www.apache.org/licenses/LICENSE-2.0\"  target=\"_blank\"\u003e\u003cimg alt=\"License: Apache 2.0\"  src=\"https://img.shields.io/badge/License-Apache 2.0-yellow.svg\" /\u003e\u003c/a\u003e \n  \u003c/p\u003e \n\u003c/div\u003e    \n\n**Plugin to collect Google Cloud**\n\n\u003e SpaceONE's [plugin-google-cloud-inven-collector](https://github.com/spaceone-dev/plugin-google-cloud-inven-collector) is a convenient tool to\nget cloud service data from Google Cloud platform.\n\n\nFind us also at [Dockerhub](https://hub.docker.com/repository/docker/spaceone/plugin-google-cloud-inven-collector)\n\n\nPlease contact us if you need any further information. (\u003csupport@spaceone.dev\u003e)\n\n---\n\n\n\u003cbr\u003e\n\u003cbr\u003e\n\n### Google Service Endpoint (in use)\nThere is an endpoints used to collect resources information of GCP. Endpoint of served GCP is a URL consisting of a service code.\n```text\nhttps://[service-code].googleapis.com\n```\n\nWe use dozens of endpoints because we collect information from many services.\n\n\u003cbr\u003e\n\u003cbr\u003e\n\n### Service list\n\nThe following is a list of services being collected and service code information.\n\n|No.|Service name|Service Code|\n|---|------|---|\n|1|Compute Engine|compute|\n|2|Networking|compute|\n|3|Cloud SQL|sqladmin|\n|4|Storage|storage|\n|5|BigQuery|bigquery|\n|6|Cloud Pub/Sub|pubsub|\n|7|Cloud Functions|cloudfunctions|\n|8|Recommender|recommender\n\nIf you want to know the detailed service endpoint, please check the [content details](###content-details) below.\n\n\u003cbr\u003e\n\u003cbr\u003e\n\n### Content details\n\n* Table of Contents\n    * [Compute Engine](#compute-engine)\n        * [VM Instance](#vm-instance)\n        * [Instance Template](#instance-template)\n        * [Instance Group](#instance-group)\n        * [Machine Images](#machine-images)\n        * [Disk](#disk)\n        * [Snapshot](#snapshot)\n    * [Networking](#networking)\n        * [VPC Network](#vpc-network)\n        * [Route](#route)\n        * [External IP Address](#external-ip-address)\n        * [Firewall](#firewall)\n        * [LoadBalancing](#loadbalancing)\n    * [Cloud SQL](#cloud-sql)\n        * [Instance](#instance)\n    * [Storage](#storage)\n        * [Buckets](#Bucket)\n    * [BigQuery](#bigquery)\n        * [SQLWorkspace](#SQLWorkspace)\n    * [Cloud Pub/Sub](#cloud-pub/sub)\n        * [Topic](#topic)\n        * [Subscription](#subscription)\n        * [Snapshot](#snapshot)\n        * [Schema](#schema)\n    * [Cloud Fuctions](#cloud-functions)\n        * [Function](#function)\n    * [Recommender](#recommender)\n        * [Recommendation](#recommendation)\n        * [Insight](#insight)\n    * [Options](#options)\n      * [CloudServiceType](#cloud-service-type--specify-what-to-collect)\n      * [ServiceCodeMapper](#service-code-mapper--update-service-code-in-cloud-service-type)\n\n\u003cbr\u003e\n\u003cbr\u003e\n\n## Authentication Overview\nRegistered service account on SpaceONE must have certain permissions to collect cloud service data\nPlease, set authentication privilege for followings:\n\n#### [Compute Engine](https://cloud.google.com/compute/docs/apis)\n\n- ##### VM Instance\n    - Scopes\n        - https://www.googleapis.com/auth/compute\n        - https://www.googleapis.com/auth/cloud-platform\n\n    - IAM\n        - compute.zones.list\n        - compute.regions.list\n        - compute.instances.list\n        - compute.machineTypes.list\n        - compute.urlMaps.list\n        - compute.backendServices.list\n        - compute.disks.list\n        - compute.diskTypes.list\n        - compute.autoscalers.list\n        - compute.images.list\n        - compute.subnetworks.list\n        - compute.regionUrlMaps.list\n        - compute.backendServices.list\n        - compute.targetPools.list\n        - compute.forwardingRules.list\n\n    - Service Endpoint\n        - https://compute.googleapis.com/compute/v1/projects/{project}/aggregated/{resource_name}\n        - https://compute.googleapis.com/compute/v1/projects/{project}/global/{resource_name}\n        - https://compute.googleapis.com/compute/v1/projects/{project}/zone/{zone}/{resource_name}\n        - https://compute.googleapis.com/compute/v1/projects/{project}/regions/{region}/{resource_name}\n\n- ##### Instance Template\n    - Scopes\n        - https://www.googleapis.com/auth/compute\n        - https://www.googleapis.com/auth/cloud-platform\n\n    - IAM\n        - compute.instanceGroupManagers.list\n        - compute.machineTypes.list\n        - compute.disks.list\n        - compute.instanceTemplates.list\n\n    - Service Endpoint\n        - https://compute.googleapis.com/compute/v1/projects/{project}/aggregated/{resource_name}\n        - https://compute.googleapis.com/compute/v1/projects/{project}/global/{resource_name}\n        - https://compute.googleapis.com/compute/v1/projects/{project}/zone/{zone}/{resource_name}\n        - https://compute.googleapis.com/compute/v1/projects/{project}/regions/{region}/{resource_name}\n\n- ##### Instance Group\n    - Scopes\n        - https://www.googleapis.com/auth/compute\n        - https://www.googleapis.com/auth/cloud-platform\n\n    - IAM\n        - compute.instanceGroups.list\n        - compute.instanceGroupManagers.list\n        - compute.instances.list\n        - compute.autoscalers.list\n        - compute.instanceTemplates.list\n\n    - Service Endpoint\n        - https://compute.googleapis.com/compute/v1/projects/{project}/aggregated/{resource_name}\n        - https://compute.googleapis.com/compute/v1/projects/{project}/global/{resource_name}\n        - https://compute.googleapis.com/compute/v1/projects/{project}/zone/{zone}/{resource_name}\n        - https://compute.googleapis.com/compute/v1/projects/{project}/regions/{region}/{resource_name}\n\n- #### Machine Images\n    - Scopes\n        - https://www.googleapis.com/auth/compute\n        - https://www.googleapis.com/auth/cloud-platform\n\n    - IAM\n        - compute.machineImages.list\n        - compute.machineTypes.list\n        - compute.disks.list\n        - compute.images.list\n\n    - Service Endpoint\n        - https://compute.googleapis.com/compute/v1/projects/{project}/aggregated/{resource_name}\n        - https://compute.googleapis.com/compute/v1/projects/{project}/global/{resource_name}\n        - https://compute.googleapis.com/compute/v1/projects/{project}/zone/{zone}/{resource_name}\n        - https://compute.googleapis.com/compute/v1/projects/{project}/regions/{region}/{resource_name}\n\n- #### Disk\n    - Scopes\n        - https://www.googleapis.com/auth/compute\n        - https://www.googleapis.com/auth/cloud-platform\n\n    - IAM\n        - compute.disks.list\n        - compute.resourcePolicies.list\n\n    - Service Endpoint\n        - https://compute.googleapis.com/compute/v1/projects/{project}/aggregated/{resource_name}\n        - https://compute.googleapis.com/compute/v1/projects/{project}/global/{resource_name}\n        - https://compute.googleapis.com/compute/v1/projects/{project}/zone/{zone}/{resource_name}\n        - https://compute.googleapis.com/compute/v1/projects/{project}/regions/{region}/{resource_name}\n\n- #### Snapshot\n    - Scopes\n        - https://www.googleapis.com/auth/compute\n        - https://www.googleapis.com/auth/cloud-platform\n\n    - IAM\n        - compute.snapshots.list\n        - compute.resourcePolicies.list\n        - compute.disks.list\n\n    - Service Endpoint\n        - https://compute.googleapis.com/compute/v1/projects/{project}/aggregated/{resource_name}\n        - https://compute.googleapis.com/compute/v1/projects/{project}/global/{resource_name}\n        - https://compute.googleapis.com/compute/v1/projects/{project}/zone/{zone}/{resource_name}\n        - https://compute.googleapis.com/compute/v1/projects/{project}/regions/{region}/{resource_name}\n\n\n#### [Networking](https://cloud.google.com/compute/docs/apis)\n\n- #### VPC Network\n    - Scopes\n        - https://www.googleapis.com/auth/compute\n        - https://www.googleapis.com/auth/cloud-platform\n\n    - IAM\n        - compute.instances.list\n        - compute.forwardingRules.list\n        - compute.networks.list\n        - compute.addresses.list\n        - compute.globalAddresses.list\n        - compute.subnetworks.list\n        - compute.firewalls.list\n        - compute.routes.list\n\n    - Service Endpoint\n        - https://compute.googleapis.com/compute/v1/projects/{project}/aggregated/{resource_name}\n        - https://compute.googleapis.com/compute/v1/projects/{project}/global/{resource_name}\n        - https://compute.googleapis.com/compute/v1/projects/{project}/zone/{zone}/{resource_name}\n        - https://compute.googleapis.com/compute/v1/projects/{project}/regions/{region}/{resource_name}\n\n- #### Route\n    - Scopes\n        - https://www.googleapis.com/auth/compute\n        - https://www.googleapis.com/auth/cloud-platform\n\n    - IAM\n        - compute.routes.list\n        - compute.instances.list\n\n    - Service Endpoint\n        - https://compute.googleapis.com/compute/v1/projects/{project}/aggregated/{resource_name}\n        - https://compute.googleapis.com/compute/v1/projects/{project}/global/{resource_name}\n        - https://compute.googleapis.com/compute/v1/projects/{project}/zone/{zone}/{resource_name}\n        - https://compute.googleapis.com/compute/v1/projects/{project}/regions/{region}/{resource_name}\n\n- #### External IP Address\n    - Scopes\n        - https://www.googleapis.com/auth/compute\n        - https://www.googleapis.com/auth/cloud-platform\n\n    - IAM\n        - compute.instances.list\n        - compute.forwardingRules.list\n        - compute.addresses.list\n\n    - Service Endpoint\n        - https://compute.googleapis.com/compute/v1/projects/{project}/aggregated/{resource_name}\n        - https://compute.googleapis.com/compute/v1/projects/{project}/global/{resource_name}\n        - https://compute.googleapis.com/compute/v1/projects/{project}/zone/{zone}/{resource_name}\n        - https://compute.googleapis.com/compute/v1/projects/{project}/regions/{region}/{resource_name}\n\n- #### Firewall\n    - Scopes\n        - https://www.googleapis.com/auth/compute\n        - https://www.googleapis.com/auth/cloud-platform\n\n    - IAM\n        - compute.instances.list\n        - compute.firewalls.list\n\n    - Service Endpoint\n        - https://compute.googleapis.com/compute/v1/projects/{project}/aggregated/{resource_name}\n        - https://compute.googleapis.com/compute/v1/projects/{project}/global/{resource_name}\n        - https://compute.googleapis.com/compute/v1/projects/{project}/zone/{zone}/{resource_name}\n        - https://compute.googleapis.com/compute/v1/projects/{project}/regions/{region}/{resource_name}\n\n- #### LoadBalancing\n    - Scopes\n        - https://www.googleapis.com/auth/compute\n        - https://www.googleapis.com/auth/cloud-platform\n\n    - IAM\n        - compute.urlMaps.list\n        - compute.backendBuckets.list\n        - compute.backendServices.list\n        - compute.targetPools.list\n        - compute.forwardingRules.list\n        - compute.targetGrpcProxies.list\n        - compute.targetHttpProxies.list\n        - compute.targetHttpsProxies.list\n        - compute.targetGrpcProxies.list\n        - compute.healthChecks.list\n        - compute.httpHealthChecks.list\n        - compute.httpsHealthChecks.list\n        - compute.autoscalers.list\n\n    - Service Endpoint\n        - https://compute.googleapis.com/compute/v1/projects/{project}/aggregated/{resource_name}\n        - https://compute.googleapis.com/compute/v1/projects/{project}/global/{resource_name}\n        - https://compute.googleapis.com/compute/v1/projects/{project}/zone/{zone}/{resource_name}\n        - https://compute.googleapis.com/compute/v1/projects/{project}/regions/{region}/{resource_name}\n\n\n#### [Cloud SQL](https://cloud.google.com/sql/docs/mysql/apis)\n- #### Instance\n    - Scopes\n        - https://www.googleapis.com/auth/cloud-platform\n        - https://www.googleapis.com/auth/sqlservice.admin\n\n    - IAM\n        - sqladmin.instances.list\n        - sqladmin.databases.list\n        - sqladmin.users.list\n        - sqladmin.backup_runs.list\n\n    - Service Endpoint\n        - https://sqladmin.googleapis.com/v1/projects/{project}/{resources}\n        - https://sqladmin.googleapis.com/v1/projects/{project}/instances/{instance}/{resources}\n\n\n\n#### [Storage](https://cloud.google.com/storage/docs/apis)\n- #### Bucket\n    - IAM\n        - storage.buckets.get\n        - storage.objects.list\n        - storage.objects.getIamPolicy\n\n    - Service Endpoint\n        - https://storage.googleapis.com/storage/v1/b/{resource}\n\n\n#### [BigQuery](https://cloud.google.com/bigquery/docs/reference)\n- #### SQLWorkspace\n    - IAM\n        - bigquery.datasets.get\n        - bigquery.tables.get\n        - bigquery.tables.list\n        - bigquery.jobs.list\n        - resourcemanager.projects.get\n\n    - Service Endpoint\n        - https://bigquery.googleapis.com/bigquery/v2/projects/{projectId}/{resource}\n\n\n#### [Pub/Sub](https://cloud.google.com/pubsub/docs/reference)\n- #### Topic\n    - IAM\n        - pubsub.topics.list\n        - pubsub.subscriptions.get\n        - pubsub.snapshots.get\n\n    - Service Endpoint\n        - https://pubsub.googleapis.com/v1/{project}/topics\n        - https://pubsub.googleapis.com/v1/{subscription}\n        - https://pubsub.googleapis.com/v1/{snapshot}\n- #### Subscription\n    - IAM\n        - pubsub.subscriptions.list\n\n    - Service Endpoint\n        - https://pubsub.googleapis.com/v1/{project}/subscriptions\n- #### Snapshot\n    - IAM\n        - pubsub.snapshots.list\n\n    - Service Endpoint\n        - https://pubsub.googleapis.com/v1/{project}/snapshots\n- #### Schema\n    - IAM\n        - pubsub.schemas.list\n\n    - Service Endpoint\n        - https://pubsub.googleapis.com/v1/{parent}/schemas\n\n#### [Functions](https://cloud.google.com/functions/docs/reference)\n- #### Function\n    - IAM\n        - 1st Generation\n          - cloudfunctions.functions.list\n          - storage.bucket.get\n        - 2nd Generation\n          - cloudfunctions.functions.list\n          - storage.bucket.get\n          - eventarc.providers.list\n\n    - Service Endpoint\n        - 1st Generation\n          - https://cloudfunctions.googleapis.com/v1/{parent=projects/*/locations/*}/functions\n          - https://storage.googleapis.com/storage/v1/b/{bucket}\n        - 2nd Generation\n          - https://cloudfunctions.googleapis.com/v2/{parent=projects/*/locations/*}/functions\n          - https://storage.googleapis.com/storage/v1/b/{bucket}\n          - https://eventarc.googleapis.com/v1/{parent=projects/*/locations/*}/providers\n\n#### [Recommender](https://cloud.google.com/recommender/docs/overview)\n- #### Recommendation \u0026 Insight\n    - IAM\n        - cloudasset.assets.listResource\n        - cloudasset.assets.listIamPolicy\n        - cloudasset.assets.listOrgPolicy\n        - cloudasset.assets.listAccessPolicy\n        - cloudasset.assets.listOSInventories\n        - recommender.*.get\n        - recommender.*.list\n\n    - Recommendation Service Endpoint\n        - https://recommender.googleapis.com/v1/{name=projects/*/locations/*/recommenders/*/recommendations/*}\n\n    - Insight Service Endpoint\n        - https://cloudasset.googleapis.com/v1/{parent=*/*}/assets\n        - https://recommender.googleapis.com/v1/{parent=projects/*/locations/*/insightTypes/*}/insights\n\n---\n\n## Options\n\n### Cloud Service Type : Specify what to collect\n\nIf `cloud_service_types` is added to the list elements in options, only the specified cloud service type is collected.\nBy default, if cloud_service_types is not specified in options, all services are collected.\n\nThe cloud_service_types items that can be specified are as follows.\n\n\u003cpre\u003e\n\u003ccode\u003e\n{\n    \"cloud_service_types\": [\n    'ComputeEngine'\n    'CloudSQL',\n    'BigQuery',\n    'CloudStorage',\n    'Networking'\n    ]\n}\n\u003c/code\u003e\n\u003c/pre\u003e\n\nHow to update plugin information using spacectl is as follows.\nFirst, create a yaml file to set options.\n\n\u003cpre\u003e\n\u003ccode\u003e\n\u003e cat update_collector.yaml\n---\ncollector_id: collector-xxxxxxx\noptions:\n  cloud_service_types:\n    - CloudSQL\n    - VPCNetwork\n\u003c/code\u003e\n\u003c/pre\u003e\n\nUpdate plugin through spacectl command with the created yaml file.\n\n\u003cpre\u003e\u003ccode\u003e\n\u003e spacectl exec update_plugin inventory.Collector -f update_collector.yaml\n\u003c/code\u003e\u003c/pre\u003e\n\n\n### Service Code Mapper : Update service code in Cloud Service Type.\n\nIf `service_code_mapper` is in options, You can replace the existed service code into new value one. \nThe default service code is listed below [service code list](#service-list) \n\u003cpre\u003e\n\u003ccode\u003e\n{\n    \"service_code_mappers\": {\n        \"Compute Engine\": \"Your new service code\",\n        \"Cloud SQL\": \"Your new service code\",\n    }\n}\n\u003c/code\u003e\n\u003c/pre\u003e\n\n### Custom Asset URL : Update ASSET_URL  in Cloud Service Type.\n\nIf `custom_asset_url` is in options, You can change it to an asset_url that users will use instead of the default asset_url.  \nThe default ASSET_URL in cloud_service_conf is \n`https://spaceone-custom-assets.s3.ap-northeast-2.amazonaws.com/console-assets/icons/cloud-services/google_cloud`.\n\n\u003cpre\u003e\n\u003ccode\u003e\n{\n    \"custom_asset_url\": \"https://xxxxx.spaceone.dev/icon/google\"\n}\n\u003c/code\u003e\n\u003c/pre\u003e\n\n---","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcloudforet-io%2Fplugin-google-cloud-inven-collector","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcloudforet-io%2Fplugin-google-cloud-inven-collector","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcloudforet-io%2Fplugin-google-cloud-inven-collector/lists"}