Skip to content

googleMonitoringGroup

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:

Example Usage - Monitoring Group Basic

/*Provider bindings are generated by running cdktf get.
See https://cdk.tf/provider-generation for more details.*/
import * as google from "./.gen/providers/google";
/*The following providers are missing schema information and might need manual adjustments to synthesize correctly: google.
For a more precise conversion please use the --provider flag in convert.*/
new google.monitoringGroup.MonitoringGroup(this, "basic", {
  display_name: "tf-test MonitoringGroup",
  filter: 'resource.metadata.region="europe-west2"',
});

Example Usage - Monitoring Group Subgroup

/*Provider bindings are generated by running cdktf get.
See https://cdk.tf/provider-generation for more details.*/
import * as google from "./.gen/providers/google";
/*The following providers are missing schema information and might need manual adjustments to synthesize correctly: google.
For a more precise conversion please use the --provider flag in convert.*/
const googleMonitoringGroupParent = new google.monitoringGroup.MonitoringGroup(
  this,
  "parent",
  {
    display_name: "tf-test MonitoringParentGroup",
    filter: 'resource.metadata.region="europe-west2"',
  }
);
new google.monitoringGroup.MonitoringGroup(this, "subgroup", {
  display_name: "tf-test MonitoringSubGroup",
  filter: 'resource.metadata.region="europe-west2"',
  parent_name: googleMonitoringGroupParent.name,
});

Argument Reference

The following arguments are supported:

  • displayName - (Required) A user-assigned name for this group, used only for display purposes.

  • filter - (Required) The filter used to determine which monitored resources belong to this group.


  • parentName - (Optional) 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, "".

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

  • project - (Optional) The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

Attributes Reference

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

  • id - an identifier for the resource with format {{name}}

  • name - A unique identifier for this group. The format is "projects/{project_id_or_number}/groups/{group_id}".

Timeouts

This resource provides the following Timeouts configuration options:

  • create - Default is 20 minutes.
  • update - Default is 20 minutes.
  • delete - Default is 20 minutes.

Import

Group can be imported using any of these accepted formats:

$ terraform import google_monitoring_group.default {{name}}

User Project Overrides

This resource supports User Project Overrides.