google_monitoring_group

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:

Open in Cloud Shell

Example Usage - Monitoring Group Basic

resource "google_monitoring_group" "basic" {
  display_name = "tf-test MonitoringGroup"

  filter = "resource.metadata.region=\"europe-west2\""
}
Open in Cloud Shell

Example Usage - Monitoring Group Subgroup

resource "google_monitoring_group" "parent" {
  display_name = "tf-test MonitoringParentGroup"
  filter       = "resource.metadata.region=\"europe-west2\""
}

resource "google_monitoring_group" "subgroup" {
  display_name = "tf-test MonitoringSubGroup"
  filter       = "resource.metadata.region=\"europe-west2\""
  parent_name  =  google_monitoring_group.parent.name
}

Argument Reference

The following arguments are supported:


Attributes Reference

In addition to the arguments listed above, the following computed attributes are exported:

Timeouts

This resource provides the following Timeouts configuration options:

Import

Group can be imported using any of these accepted formats:

In Terraform v1.5.0 and later, use an import block to import Group using one of the formats above. For example:

import {
  id = "{{name}}"
  to = google_monitoring_group.default
}

When using the terraform import command, Group can be imported using one of the formats above. For example:

$ terraform import google_monitoring_group.default {{name}}

User Project Overrides

This resource supports User Project Overrides.