mirror of
https://github.com/letic/terraform-provider-google.git
synced 2024-10-03 01:01:06 +00:00
upgrade monitoring tests to 0.12 syntax (#2754)
<!-- This change is generated by MagicModules. --> /cc @chrisst
This commit is contained in:
parent
e55e6a403f
commit
4a706f7225
@ -120,24 +120,20 @@ resource "google_monitoring_alert_policy" "basic" {
|
|||||||
enabled = true
|
enabled = true
|
||||||
combiner = "OR"
|
combiner = "OR"
|
||||||
|
|
||||||
conditions = [
|
conditions {
|
||||||
{
|
|
||||||
display_name = "%s"
|
display_name = "%s"
|
||||||
|
|
||||||
condition_threshold = {
|
condition_threshold {
|
||||||
aggregations = [
|
aggregations {
|
||||||
{
|
|
||||||
alignment_period = "60s"
|
alignment_period = "60s"
|
||||||
per_series_aligner = "%s"
|
per_series_aligner = "%s"
|
||||||
},
|
}
|
||||||
]
|
|
||||||
|
|
||||||
duration = "60s"
|
duration = "60s"
|
||||||
comparison = "COMPARISON_GT"
|
comparison = "COMPARISON_GT"
|
||||||
filter = "%s"
|
filter = "%s"
|
||||||
}
|
}
|
||||||
},
|
}
|
||||||
]
|
|
||||||
}
|
}
|
||||||
`, alertName, conditionName, aligner, filter)
|
`, alertName, conditionName, aligner, filter)
|
||||||
}
|
}
|
||||||
@ -149,15 +145,16 @@ resource "google_monitoring_alert_policy" "full" {
|
|||||||
combiner = "OR"
|
combiner = "OR"
|
||||||
enabled = true
|
enabled = true
|
||||||
|
|
||||||
conditions = [
|
conditions {
|
||||||
{
|
|
||||||
display_name = "%s"
|
display_name = "%s"
|
||||||
|
|
||||||
condition_threshold = {
|
condition_threshold {
|
||||||
threshold_value = 50
|
threshold_value = 50
|
||||||
|
filter = "metric.type=\"compute.googleapis.com/instance/disk/write_bytes_count\" AND resource.type=\"gce_instance\""
|
||||||
|
duration = "60s"
|
||||||
|
comparison = "COMPARISON_GT"
|
||||||
|
|
||||||
aggregations = [
|
aggregations {
|
||||||
{
|
|
||||||
alignment_period = "60s"
|
alignment_period = "60s"
|
||||||
per_series_aligner = "ALIGN_RATE"
|
per_series_aligner = "ALIGN_RATE"
|
||||||
cross_series_reducer = "REDUCE_MEAN"
|
cross_series_reducer = "REDUCE_MEAN"
|
||||||
@ -168,20 +165,17 @@ resource "google_monitoring_alert_policy" "full" {
|
|||||||
"resource.label.instance_id",
|
"resource.label.instance_id",
|
||||||
"resource.label.zone",
|
"resource.label.zone",
|
||||||
]
|
]
|
||||||
},
|
}
|
||||||
]
|
|
||||||
|
|
||||||
duration = "60s"
|
trigger {
|
||||||
comparison = "COMPARISON_GT"
|
|
||||||
|
|
||||||
trigger = {
|
|
||||||
percent = 10
|
percent = 10
|
||||||
}
|
}
|
||||||
|
|
||||||
filter = "metric.type=\"compute.googleapis.com/instance/disk/write_bytes_count\" AND resource.type=\"gce_instance\""
|
|
||||||
}
|
}
|
||||||
},
|
}
|
||||||
{
|
|
||||||
|
conditions {
|
||||||
|
display_name = "%s"
|
||||||
|
|
||||||
condition_absent {
|
condition_absent {
|
||||||
duration = "3600s"
|
duration = "3600s"
|
||||||
filter = "metric.type=\"compute.googleapis.com/instance/cpu/utilization\" AND resource.type=\"gce_instance\""
|
filter = "metric.type=\"compute.googleapis.com/instance/cpu/utilization\" AND resource.type=\"gce_instance\""
|
||||||
@ -202,10 +196,7 @@ resource "google_monitoring_alert_policy" "full" {
|
|||||||
count = 1
|
count = 1
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
display_name = "%s"
|
|
||||||
},
|
|
||||||
]
|
|
||||||
|
|
||||||
documentation {
|
documentation {
|
||||||
content = "test content"
|
content = "test content"
|
||||||
|
@ -49,7 +49,7 @@ resource "google_monitoring_uptime_check_config" "http" {
|
|||||||
display_name = "http-uptime-check-%s"
|
display_name = "http-uptime-check-%s"
|
||||||
timeout = "60s"
|
timeout = "60s"
|
||||||
|
|
||||||
http_check = {
|
http_check {
|
||||||
path = "/some-path"
|
path = "/some-path"
|
||||||
port = "8010"
|
port = "8010"
|
||||||
}
|
}
|
||||||
@ -62,7 +62,7 @@ resource "google_monitoring_uptime_check_config" "http" {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
content_matchers = {
|
content_matchers {
|
||||||
content = "example"
|
content = "example"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -96,7 +96,7 @@ resource "google_monitoring_uptime_check_config" "tcp_group" {
|
|||||||
display_name = "tcp-uptime-check-%s"
|
display_name = "tcp-uptime-check-%s"
|
||||||
timeout = "60s"
|
timeout = "60s"
|
||||||
|
|
||||||
tcp_check = {
|
tcp_check {
|
||||||
port = 888
|
port = 888
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -45,10 +45,10 @@ resource "google_monitoring_uptime_check_config" "http" {
|
|||||||
display_name = "http-uptime-check-%s"
|
display_name = "http-uptime-check-%s"
|
||||||
timeout = "60s"
|
timeout = "60s"
|
||||||
|
|
||||||
http_check = {
|
http_check {
|
||||||
path = "/%s"
|
path = "/%s"
|
||||||
port = "8010"
|
port = "8010"
|
||||||
auth_info = {
|
auth_info {
|
||||||
username = "name"
|
username = "name"
|
||||||
password = "%s"
|
password = "%s"
|
||||||
}
|
}
|
||||||
@ -62,7 +62,7 @@ resource "google_monitoring_uptime_check_config" "http" {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
content_matchers = {
|
content_matchers {
|
||||||
content = "example"
|
content = "example"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -43,7 +43,7 @@ resource "google_monitoring_uptime_check_config" "http" {
|
|||||||
display_name = "http-uptime-check"
|
display_name = "http-uptime-check"
|
||||||
timeout = "60s"
|
timeout = "60s"
|
||||||
|
|
||||||
http_check = {
|
http_check {
|
||||||
path = "/some-path"
|
path = "/some-path"
|
||||||
port = "8010"
|
port = "8010"
|
||||||
}
|
}
|
||||||
@ -56,7 +56,7 @@ resource "google_monitoring_uptime_check_config" "http" {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
content_matchers = {
|
content_matchers {
|
||||||
content = "example"
|
content = "example"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -74,7 +74,7 @@ resource "google_monitoring_uptime_check_config" "tcp_group" {
|
|||||||
display_name = "tcp-uptime-check"
|
display_name = "tcp-uptime-check"
|
||||||
timeout = "60s"
|
timeout = "60s"
|
||||||
|
|
||||||
tcp_check = {
|
tcp_check {
|
||||||
port = 888
|
port = 888
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user