googleMonitoringService
A Service is a discrete, autonomous, and network-accessible unit, designed to solve an individual concern (Wikipedia). 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:
- API documentation
- How-to Guides
- Service Monitoring
- Monitoring API Documentation
Example Usage - Monitoring Service Example
/*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.monitoringService.MonitoringService(this, "my_service", {
basic_service: [
{
service_labels: [
{
module_id: "another-module-id",
},
],
service_type: "APP_ENGINE",
},
],
display_name: "My Service my-service",
service_id: "my-service",
user_labels: [
{
my_key: "my_value",
my_other_key: "my_other_value",
},
],
});
Argument Reference
The following arguments are supported:
serviceId
- (Required) An optional service ID to use. If not given, the server will generate a service ID.
-
displayName
- (Optional) Name used for UI elements listing this Service. -
userLabels
- (Optional) Labels which have been used to annotate the service. Label keys must start with a letter. Label keys and values may contain lowercase letters, numbers, underscores, and dashes. Label keys and values have a maximum length of 63 characters, and must be less than 128 bytes in size. Up to 64 label entries may be stored. For labels which do not have a semantic value, the empty string may be supplied for the label value. -
basicService
- (Optional) A well-known service type, defined by its service type and service labels. Valid values of service types and services labels are described at https://cloud.google.com/stackdriver/docs/solutions/slo-monitoring/api/api-structures#basic-svc-w-basic-sli Structure is documented below. -
project
- (Optional) The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
The basicService
block supports:
-
serviceType
- (Optional) The type of service that this basic service defines, e.g. APP_ENGINE service type -
serviceLabels
- (Optional) Labels that specify the resource that emits the monitoring data which is used for SLO reporting of thisservice
.
Attributes Reference
In addition to the arguments listed above, the following computed attributes are exported:
-
id
- an identifier for the resource with formatprojects/{{project}}/services/{{serviceId}}
-
name
- The full resource name for this service. The syntax is: projects/[PROJECT_ID]/services/[SERVICE_ID]. -
telemetry
- Configuration for how to query telemetry on a Service. Structure is documented below.
resourceName
- (Optional) The full name of the resource that defines this service. Formatted as described in https://cloud.google.com/apis/design/resource_names.
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
GenericService can be imported using any of these accepted formats:
$ 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.