This is a Terraform module for deploying a pre-defined set of GCP-related dashboards in Cloud Observability meant to be used with the Cloud Observability Google Cloud Monitoring integration.
- Cloud Observability account and API Key with
member
permissions. - Metrics for Google Cloud Monitoring sending data to a Cloud Observability project.
- Terraform v1.0+
Each GCP resource has an associated module that will create Cloud Observability alerts. Currently, these resources are supported:
- TODO (module:
TODO
)
This repo has the following folder structure:
- modules: This folder contains several standalone, reusable, modules that you can use to create different types of Cloud Observability dashboards for GCP resources.
- examples: This folder shows examples of different ways to define creation of alerts.
- root folder: The root folder is an example of how to use the terraform-gcp-dashboards module. module to create Cloud Observability GCP Dashboards. The Terraform Registry requires the root of every repo to contain Terraform code, so we've put one of the examples there. This example is great for learning and experimenting, but for production use, please use the underlying modules in the modules folder directly.
To deploy create Cloud Observability alerts for production using this repo:
-
Ensure account meets module pre-requisites from above.
-
Create a Terraform configuration that pulls module(s) and specifies values of the required variables.
-
Run
terraform init
andterraform apply
with your API Key set in the environment variableLIGHTSTEP_API_KEY
(or the environment variable name you specified in configuration).
This repository uses pre-commit
to format and lint HCL code.
To install:
$ brew install pre-commit
$ pre-commit install