File tree Expand file tree Collapse file tree 2 files changed +21
-0
lines changed Expand file tree Collapse file tree 2 files changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -43,6 +43,23 @@ locals {
43
43
kubeconfig_file_name = " ${ var . cluster_project_id } -${ local . cluster_name } "
44
44
}
45
45
46
+ variable "cluster_auto_monitoring_config_scope" {
47
+ default = " ALL"
48
+ description = " Whether or not to enable GKE Auto-Monitoring. Supported values include: ALL, NONE"
49
+ type = string
50
+
51
+ validation {
52
+ condition = contains (
53
+ [
54
+ " ALL" ,
55
+ " NONE" ,
56
+ ],
57
+ var. cluster_auto_monitoring_config_scope
58
+ )
59
+ error_message = " 'cluster_auto_monitoring_config_scope' value is invalid"
60
+ }
61
+ }
62
+
46
63
variable "cluster_binary_authorization_evaluation_mode" {
47
64
default = " DISABLED"
48
65
description = " Mode of operation for Binary Authorization policy evaluation. Valid values are DISABLED and PROJECT_SINGLETON_POLICY_ENFORCE."
Original file line number Diff line number Diff line change @@ -166,6 +166,10 @@ resource "google_container_cluster" "cluster" {
166
166
167
167
managed_prometheus {
168
168
enabled = true
169
+
170
+ auto_monitoring_config {
171
+ scope = var. cluster_auto_monitoring_config_scope
172
+ }
169
173
}
170
174
}
171
175
You can’t perform that action at this time.
0 commit comments