Google Cloud (Stackdriver) Monitoring Group

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

google_monitoring_group (Terraform)

The Group in Cloud (Stackdriver) Monitoring can be configured in Terraform with the resource name google_monitoring_group. The following sections describe 1 example of how to use the resource and its parameters.

Example Usage from GitHub

monitoring_group.tf#L1
resource "google_monitoring_group" "basic" {
  display_name = "tf-test MonitoringGroup"

  filter = "resource.metadata.region=\"us-central1\""

Review your Terraform file for Google best practices

Shisho Cloud, our free checker to make sure your Terraform configuration follows best practices, is available (beta).

Parameters

A user-assigned name for this group, used only for display purposes.

The filter used to determine which monitored resources belong to this group.

If true, the members of this group are considered to be a cluster. The system can perform additional analysis on groups that are clusters.

  • name optional computed - string

A unique identifier for this group. The format is "projects/[project_id_or_number]/groups/[group_id]".

The name of the group's parent, if it has one. The format is "projects/[project_id_or_number]/groups/[group_id]". For groups with no parent, parentName is the empty string, "".

Explanation in Terraform Registry

The description of a dynamic collection of monitored resources. Each group has a filter that is matched against monitored resources and their associated metadata. If a group's filter matches an available monitored resource, then that resource is a member of that group. To get more information about Group, see:

Frequently asked questions

What is Google Cloud (Stackdriver) Monitoring Group?

Google Cloud (Stackdriver) Monitoring Group 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 Group?

For Terraform, the catd87/git-course source code example is useful. See the Terraform Example section for further details.

security-icon

Automate config file reviews on your commits

Fix issues in your infrastructure as code with auto-generated patches.