From 4a00b72172a4202c945ca8e412c848ec0f915506 Mon Sep 17 00:00:00 2001 From: venkykuberan Date: Thu, 4 Jun 2020 13:57:03 -0700 Subject: [PATCH 1/3] add matcher attribute to contentmatcher --- products/monitoring/api.yaml | 10 ++++++++++ .../resource_monitoring_uptime_check_config_test.go | 1 + 2 files changed, 11 insertions(+) diff --git a/products/monitoring/api.yaml b/products/monitoring/api.yaml index 90b182f83c5b..07085aaea3f6 100644 --- a/products/monitoring/api.yaml +++ b/products/monitoring/api.yaml @@ -1623,6 +1623,16 @@ objects: name: content description: String or regex content to match (max 1024 bytes) required: true + - !ruby/object:Api::Type::Enum + name: matcher + description: The type of content matcher that will be applied to the server output, + compared to the content string when the check is run. + values: + - :CONTAINS_STRING + - :NOT_CONTAINS_STRING + - :MATCHES_REGEX + - :NON_MATCHES_REGEX + required: true - !ruby/object:Api::Type::Array name: selectedRegions description: The list of regions from which the check will be run. Some regions diff --git a/third_party/terraform/tests/resource_monitoring_uptime_check_config_test.go b/third_party/terraform/tests/resource_monitoring_uptime_check_config_test.go index 610d3ef75e0c..d596e8efea8d 100644 --- a/third_party/terraform/tests/resource_monitoring_uptime_check_config_test.go +++ b/third_party/terraform/tests/resource_monitoring_uptime_check_config_test.go @@ -106,6 +106,7 @@ resource "google_monitoring_uptime_check_config" "http" { content_matchers { content = "example" + matcher = "CONTAINS_STRING" } } `, suffix, path, project, pwd, host, From dd16acfe3d0aff873fb90b2bd9e6802694c34f41 Mon Sep 17 00:00:00 2001 From: venkykuberan Date: Mon, 8 Jun 2020 12:54:43 -0700 Subject: [PATCH 2/3] removed the required field as its mandatory --- products/monitoring/api.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/products/monitoring/api.yaml b/products/monitoring/api.yaml index 07085aaea3f6..895938513e86 100644 --- a/products/monitoring/api.yaml +++ b/products/monitoring/api.yaml @@ -1632,7 +1632,6 @@ objects: - :NOT_CONTAINS_STRING - :MATCHES_REGEX - :NON_MATCHES_REGEX - required: true - !ruby/object:Api::Type::Array name: selectedRegions description: The list of regions from which the check will be run. Some regions From bf1519bf1f32b410546a06c689e62b35baf84717 Mon Sep 17 00:00:00 2001 From: venkykuberan Date: Mon, 8 Jun 2020 16:22:38 -0700 Subject: [PATCH 3/3] tab removed and used spaces --- .../tests/resource_monitoring_uptime_check_config_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/third_party/terraform/tests/resource_monitoring_uptime_check_config_test.go b/third_party/terraform/tests/resource_monitoring_uptime_check_config_test.go index d596e8efea8d..fce40ccee25b 100644 --- a/third_party/terraform/tests/resource_monitoring_uptime_check_config_test.go +++ b/third_party/terraform/tests/resource_monitoring_uptime_check_config_test.go @@ -106,7 +106,7 @@ resource "google_monitoring_uptime_check_config" "http" { content_matchers { content = "example" - matcher = "CONTAINS_STRING" + matcher = "CONTAINS_STRING" } } `, suffix, path, project, pwd, host,