google_monitoring_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 GenericService, see:

Open in Cloud Shell

Example Usage - Monitoring Service Example

resource "google_monitoring_service" "my_service" {
  service_id = "my-service"
  display_name = "My Service my-service"

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

  basic_service {
    service_type  = "APP_ENGINE"
    service_labels = {
      module_id = "another-module-id"
    }
  }
}

Argument Reference

The following arguments are supported:


The basic_service block supports:

Attributes Reference

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

The telemetry block contains:

Timeouts

This resource provides the following Timeouts configuration options:

Import

GenericService can be imported using any of these accepted formats:

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

import {
  id = "projects/{{project}}/services/{{service_id}}"
  to = google_monitoring_service.default
}

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

$ terraform import google_monitoring_service.default projects/{{project}}/services/{{service_id}}
$ terraform import google_monitoring_service.default {{project}}/{{service_id}}
$ terraform import google_monitoring_service.default {{service_id}}

User Project Overrides

This resource supports User Project Overrides.