From c49de44a3789b6c8c76e3cb7b685fd11cc3aa721 Mon Sep 17 00:00:00 2001 From: Dana Hoffman Date: Fri, 9 Aug 2019 16:04:24 +0000 Subject: [PATCH] have the magician tag a reviewer for external PRs Signed-off-by: Modular Magician --- .../resource_logging_metric_generated_test.go | 80 ------------------- website/docs/r/logging_metric.html.markdown | 44 ---------- 2 files changed, 124 deletions(-) diff --git a/google/resource_logging_metric_generated_test.go b/google/resource_logging_metric_generated_test.go index 1a9070a602f..06919e54c25 100644 --- a/google/resource_logging_metric_generated_test.go +++ b/google/resource_logging_metric_generated_test.go @@ -75,86 +75,6 @@ resource "google_logging_metric" "logging_metric" { `, context) } -func TestAccLoggingMetric_loggingMetricCounterBasicExample(t *testing.T) { - t.Parallel() - - context := map[string]interface{}{ - "random_suffix": acctest.RandString(10), - } - - resource.Test(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t) }, - Providers: testAccProviders, - CheckDestroy: testAccCheckLoggingMetricDestroy, - Steps: []resource.TestStep{ - { - Config: testAccLoggingMetric_loggingMetricCounterBasicExample(context), - }, - { - ResourceName: "google_logging_metric.logging_metric", - ImportState: true, - ImportStateVerify: true, - }, - }, - }) -} - -func testAccLoggingMetric_loggingMetricCounterBasicExample(context map[string]interface{}) string { - return Nprintf(` -resource "google_logging_metric" "logging_metric" { - name = "my-(custom)/metric%{random_suffix}" - filter = "resource.type=gae_app AND severity>=ERROR" - metric_descriptor { - metric_kind = "DELTA" - value_type = "INT64" - } -} -`, context) -} - -func TestAccLoggingMetric_loggingMetricCounterLabelsExample(t *testing.T) { - t.Parallel() - - context := map[string]interface{}{ - "random_suffix": acctest.RandString(10), - } - - resource.Test(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t) }, - Providers: testAccProviders, - CheckDestroy: testAccCheckLoggingMetricDestroy, - Steps: []resource.TestStep{ - { - Config: testAccLoggingMetric_loggingMetricCounterLabelsExample(context), - }, - { - ResourceName: "google_logging_metric.logging_metric", - ImportState: true, - ImportStateVerify: true, - }, - }, - }) -} - -func testAccLoggingMetric_loggingMetricCounterLabelsExample(context map[string]interface{}) string { - return Nprintf(` -resource "google_logging_metric" "logging_metric" { - name = "my-(custom)/metric%{random_suffix}" - filter = "resource.type=gae_app AND severity>=ERROR" - metric_descriptor { - metric_kind = "DELTA" - value_type = "INT64" - labels { - key = "mass" - value_type = "STRING" - description = "amount of matter" - } - } - label_extractors = { "mass": "EXTRACT(jsonPayload.request)" } -} -`, context) -} - func testAccCheckLoggingMetricDestroy(s *terraform.State) error { for name, rs := range s.RootModule().Resources { if rs.Type != "google_logging_metric" { diff --git a/website/docs/r/logging_metric.html.markdown b/website/docs/r/logging_metric.html.markdown index c3214173453..840149cd21a 100644 --- a/website/docs/r/logging_metric.html.markdown +++ b/website/docs/r/logging_metric.html.markdown @@ -65,48 +65,6 @@ resource "google_logging_metric" "logging_metric" { } } ``` - -## Example Usage - Logging Metric Counter Basic - - -```hcl -resource "google_logging_metric" "logging_metric" { - name = "my-(custom)/metric" - filter = "resource.type=gae_app AND severity>=ERROR" - metric_descriptor { - metric_kind = "DELTA" - value_type = "INT64" - } -} -``` - -## Example Usage - Logging Metric Counter Labels - - -```hcl -resource "google_logging_metric" "logging_metric" { - name = "my-(custom)/metric" - filter = "resource.type=gae_app AND severity>=ERROR" - metric_descriptor { - metric_kind = "DELTA" - value_type = "INT64" - labels { - key = "mass" - value_type = "STRING" - description = "amount of matter" - } - } - label_extractors = { "mass": "EXTRACT(jsonPayload.request)" } -} -``` ## Argument Reference @@ -137,13 +95,11 @@ The `metric_descriptor` block supports: (Required) Whether the measurement is an integer, a floating-point number, etc. Some combinations of metricKind and valueType might not be supported. - For counter metrics, set this to INT64. * `metric_kind` - (Required) Whether the metric records instantaneous values, changes to a value, etc. Some combinations of metricKind and valueType might not be supported. - For counter metrics, set this to DELTA. * `labels` - (Optional)