[Cloudforet] Enable Google Billing Plugin

Choonho Son - Feb 28 - - Dev Community

In a Cloudfore Version 1.12.x, there is a concept of managed plugins which are already registered by code.
But plugin-google-billing-cost-datasource is not included. To enable Google Billing in Cloudforet, we need following step.

Image description

To enable Google billing plugin, there are two prerequisite

  1. Enable Local Repository
  2. Register google billing plugin

1. Enable Local Repository

spacectl exec register repository.Repository -p name="My Private Repo" -p repository_type=local
Enter fullscreen mode Exit fullscreen mode

Image description

2. Register Google Billing Plugin

  • In a spacectl POD, save gcp-billing.yaml
---
plugin_id: plugin-google-billing-cost-datasource
name: Google Billing Data Source
image: spaceone/plugin-google-billing-cost-datasource
capability:
  supported_schema:
    - google-secret-oauth2-credentials
labels: [ ]
provider: google_cloud
resource_type: cost_analysis.DataSource
tags:
  description: Google Cloud Billing Data Source
  icon: https://spaceone-custom-assets.s3.ap-northeast-2.amazonaws.com/console-assets/icons/google_cloud.svg
  long_description: Google Cloud Billing is a service that provides cost data for
    resources being used by subscriptions. This plugin can use the Cost Management
    API to collect billing data on all subscriptions in the billing account.
Enter fullscreen mode Exit fullscreen mode

Register Plugin

spacectl exec register repository.Plugin -f gcp-billing.yaml 
Enter fullscreen mode Exit fullscreen mode

Enable Google Billing DataSource

. . . . . . . . . . . . . . . . . . . . . . . . . . . .