Google Cloud (Stackdriver) Monitoring Custom Service
This page shows how to write Terraform for Cloud (Stackdriver) Monitoring Custom Service and write them securely.
google_monitoring_custom_service (Terraform)
The Custom Service in Cloud (Stackdriver) Monitoring can be configured in Terraform with the resource name google_monitoring_custom_service
. The following sections describe 5 examples of how to use the resource and its parameters.
Example Usage from GitHub
resource "google_monitoring_custom_service" "service" {
service_id = var.service_name
display_name = var.service_name
project = var.project
}
resource "google_monitoring_custom_service" "service" {
service_id = var.service_name
display_name = var.service_name
project = var.project
}
resource "google_monitoring_custom_service" "service" {
service_id = var.service_name
display_name = var.service_name
project = var.project
}
resource "google_monitoring_custom_service" "this" {
display_name = var.display_name
project = var.project
service_id = var.service_id
dynamic "telemetry" {
resource "google_monitoring_custom_service" "terraform-service" {
service_id = "terraform-service"
display_name = "Service Created by Terraform"
}
resource "google_monitoring_slo" "window_based_slo" {
Parameters
-
display_name
optional - string
Name used for UI elements listing this Service.
The full resource name for this service. The syntax is: projects/[PROJECT_ID]/services/[SERVICE_ID].
-
project
optional computed - string -
service_id
optional computed - string
An optional service ID to use. If not given, the server will generate a service ID.
-
telemetry
list block-
resource_name
optional - string
The full name of the resource that defines this service. Formatted as described in https://cloud.google.com/apis/design/resource_names.
-
-
timeouts
single block
Explanation in Terraform Registry
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 Service, see:
Frequently asked questions
What is Google Cloud (Stackdriver) Monitoring Custom Service?
Google Cloud (Stackdriver) Monitoring Custom Service is a resource for Cloud (Stackdriver) Monitoring of Google Cloud Platform. Settings can be wrote in Terraform.
Where can I find the example code for the Google Cloud (Stackdriver) Monitoring Custom Service?
For Terraform, the google/exposure-notifications-verification-server, wcraymann/K-State_PITS_AGENP and wcraymann/K-State_PITS_AGENP source code examples are useful. See the Terraform Example section for further details.