Skip to content

IAmFrench/terraform-google-billing-billboard

Repository files navigation

Google Cloud billing billboard Terraform Module

This module for GCP will create dataset used by the Google billboard and provide link to create the associated Looker Studio dashboard.

GCP Billboard v3.0

source: https://cloud.google.com/billing/docs/how-to/visualize-data

This work is based on GoogleCloudPlatform/professional-services/examples/billboard.

For a guided deployment using Cloud Shell (not Terraform), you can use the walkthrough tutorial available in the previous link.

This Terraform module use the http Terraform provider to retrieve BigQuery billing table. You will need to provide an application token to authenticate to Google Cloud REST API. You can acheve this using the following command: gcloud auth application-default print-access-token.

This Terraform Module will produce a Looker Studio Link, you will need to open it and click on the "Edit and Share" top right button to save this dashboard.

Sources

Requirements

Name Version
terraform >= 1.1.0
google >= 4.58.0
http >= 3.2.1

Providers

Name Version
google >= 4.58.0
http >= 3.2.1

Modules

No modules.

Resources

Name Type
google_bigquery_dataset.billboard resource
google_bigquery_table.billboard_detailed_table resource
google_bigquery_table.billboard_standard_table resource
http_http.billing_detailed_tables data source
http_http.billing_standard_tables data source

Inputs

Name Description Type Default Required
billboard_dataset_id Dataset ID used for the Looker Studio billboard v3.0. string "billboard" no
billboard_dataset_location Location used for BigQuery billboard datasets. string n/a yes
billboard_detailed_table_id Table ID used for the Looker Studio billboard v3.0 with detailed billing data. string "detailed_billboard" no
billboard_project_id Project ID used for hosting BigQuery billing datasets. string n/a yes
billboard_standard_table_id Table ID used for the Looker Studio billboard v3.0 with standard billing data. string "standard_billboard" no
billing_project_id Project ID used for hosting BigQuery billing datasets. string n/a yes
detailed_billing_export_dataset_id Dataset ID used for the detailed billing export. string "detailed_billing_export" no
google_application_credentials Google application crendentials used to fetch BigQuery tables REST API. use the folowing command: gcloud auth application-default print-access-token. string n/a yes
looker_studio_billboard_name Name of the Looker Studio billboard dashboard. string "Google Cloud Billboard v3.0" no
standard_billing_export_dataset_id Dataset ID used for the standard billing export. string "standard_billing_export" no

Outputs

Name Description
billboard_dataset_id BigQuery billboard dataset id.
billboard_standard_template_link Pre-configured template link to deploy the Looker Studio billboard v3.0 dashboard.