google_monitoring_custom_service

A Service is a discrete, autonomous, and network-accessible unit, designed to solve an individual concern. In Cloud Monitoring, a Service acts as the root resource under which operational aspects of the service are accessible

To get more information about Service, see:

Open in Cloud Shell

Example Usage - Monitoring Service Custom

resource "google_monitoring_custom_service" "custom" {
  service_id = "custom-srv"
  display_name = "My Custom Service custom-srv"

  telemetry {
    resource_name = "//product.googleapis.com/foo/foo/services/test"
  }

  user_labels = {
    my_key       = "my_value"
    my_other_key = "my_other_value"
  }
}

Argument Reference

The following arguments are supported:


The telemetry block supports:

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

Service can be imported using any of these accepted formats:

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

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

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

$ terraform import google_monitoring_custom_service.default {{name}}

User Project Overrides

This resource supports User Project Overrides.