Setup GCP credential for cost
Enable APIs to access your GCP project
Enable the below APIs for your project through GCP Console or Google cloud. See more here Enabling API's in your GCP project
- appengine.googleapis.com
- bigquery-json.googleapis.com
- compute.googleapis.com
- cloudfunctions.googleapis.com
- container.googleapis.com
- cloudresourcemanager.googleapis.com
- cloudkms.googleapis.com
- dns.googleapis.com
- dataflow.googleapis.com
- dataproc.googleapis.com
- iam.googleapis.com
- monitoring.googleapis.com
- pubsub.googleapis.com
- redis.googleapis.com
- serviceusage.googleapis.com
- storage-api.googleapis.com
- sqladmin.googleapis.com
Now you need to export Daily cost to BigQuery
- For predicting and analyzing the infrastructure billing data, you need to export your daily cost to BigQuery, here's how to Export Billing to BigQuery docs. Or How to export billing
Create Service Account
- Here's the docs about how to create and manage a service account from Google
- Log into your Google Cloud console and navigate to IAM Admin > Service Accounts.
- Click on "Create Service Account".
- Enter a name in the "Service account name" and description.
- Click on Continue.
- Leave the role as it is
- Click on Continue.
- Click on "Create Key".
- Leave the default JSON selected.
- Click on "Create".
- The key will be downloaded to your computer.
Now let's add this credential to MeghOps
- Goto https://app.meghops.com/auth/login and login with your account
- Now go to settings by clicking the top right corner ( Profile avatar) then
Settings
- From the
settings
page go toCloud accounts
then click onAdd credential
. - Now from this dialog select
GCP
and checkmark onScan
or if you want to use the same account for scan and cost then checkmark these two, now paste your GCP credential JSON then click onSubmit
- Done!