-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.tf
More file actions
61 lines (54 loc) · 1.85 KB
/
main.tf
File metadata and controls
61 lines (54 loc) · 1.85 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
/*
# A simple example on how to use this module
*/
locals {
# Enable all Cdoud SQL monitorings on selected instances, eg.
cloud_sql = {
instances = {
(google_sql_database_instance.master.name) = {}
(google_sql_database_instance.stage.name) = {}
}
}
# Use custom Cloud SQL cpu monitoring on google_sql_database_instance.master.name
# Use all default Cloud SQL monitoring on google_sql_database_instance.stage.name
# cloud_sql = {
# instances = {
# (google_sql_database_instance.master.name) = {
# cpu_utilization = [{
# severity = "ALERT"
# threshold = 0.90
# }]
# }
# (google_sql_database_instance.stage.name) = {}
# }
# }
# Disable Cloud SQL monitoring
# cloud_sql = {
# instances = {}
# }
# Enable default Cloud SQL monitoring on instance google_sql_database_instance.master.name
# Disable cpu utilization monitoring on instance google_sql_database_instance.stage.name
# cloud_sql = {
# instances = {
# (google_sql_database_instance.master.stage) = { cpu_utilization = [] }
# (google_sql_database_instance.master.prod) = {}
# }
# }
}
module "example" {
source = "github.com/sparkfabrik/terraform-google-services-monitoring"
version = ">= 0.1.0"
notification_channels = var.notification_channels
project_id = var.project_id
cloud_sql = local.cloud_sql
kyverno = {
cluster_name = "test-cluster"
enabled = true
use_metric_threshold = true
metric_threshold_count = 5
notification_channels = []
# Optional filter for log entries, exclude known non-actionable messages
# e.g., "-textPayload:\"stale GroupVersion discovery: metrics.k8s.io/v1beta1\""
filter_extra = "-textPayload:\"stale GroupVersion discovery: metrics.k8s.io/v1beta1\""
}
}