Google Cloud (Stackdriver) Monitoring Dashboard

This page shows how to write Terraform for Cloud (Stackdriver) Monitoring Dashboard and write them securely.

google_monitoring_dashboard (Terraform)

The Dashboard in Cloud (Stackdriver) Monitoring can be configured in Terraform with the resource name google_monitoring_dashboard. The following sections describe 3 examples of how to use the resource and its parameters.

Example Usage from GitHub

dashboard.tf#L6
resource "google_monitoring_dashboard" "dashboard-per-cluster" {
  for_each = var.name-all-clusters
  dashboard_json = templatefile(
    "./dashboard-config.json",
    {
      CLIENTNAME  = var.name-client,
main.tf#L39
resource "google_monitoring_dashboard" "dashboard" {
  dashboard_json = file(var.dashboard_json_file)
  project        = var.project_id
}

output "project_id" {
main.tf#L39
resource "google_monitoring_dashboard" "dashboard" {
  dashboard_json = file(var.dashboard_json_file)
  project        = var.project_id
}

output "project_id" {

Parameters

Explanation in Terraform Registry

A Google Stackdriver dashboard. Dashboards define the content and layout of pages in the Stackdriver web application. To get more information about Dashboards, see:

Frequently asked questions

What is Google Cloud (Stackdriver) Monitoring Dashboard?

Google Cloud (Stackdriver) Monitoring Dashboard is a resource for Cloud (Stackdriver) Monitoring of Google Cloud Platform. Settings can be wrote in Terraform.

Where can I find the example code for the Google Cloud (Stackdriver) Monitoring Dashboard?

For Terraform, the sheryao-deloitte/git_tf_cicd, GoogleCloudPlatform/dataflow-sample-applications and GoogleCloudPlatform/monitoring-dashboard-samples source code examples are useful. See the Terraform Example section for further details.

security-icon

Scan your IaC problem in 3 minutes for free

You can keep your IaC security for free. No credit card required.