From 0f71817c9fb3b7c65cd3c6c6c9020878e7c874c1 Mon Sep 17 00:00:00 2001 From: Andrew Fitzgerald Date: Wed, 19 Aug 2020 22:40:35 -0400 Subject: [PATCH 01/10] Add filter value properties with explicit types. --- example/board/main.tf | 2 +- honeycombio/data_source_query.go | 122 ++++++++++++++++++++------ honeycombio/data_source_query_test.go | 33 ++++++- 3 files changed, 126 insertions(+), 31 deletions(-) diff --git a/example/board/main.tf b/example/board/main.tf index 6dd8b9a0..7376a2e2 100644 --- a/example/board/main.tf +++ b/example/board/main.tf @@ -30,7 +30,7 @@ data "honeycombio_query" "query" { filter { column = "app.tenant" op = "=" - value = "ThatSpecialTenant" + value_string = "ThatSpecialTenant" } } diff --git a/honeycombio/data_source_query.go b/honeycombio/data_source_query.go index f29626a9..45b6aa8a 100644 --- a/honeycombio/data_source_query.go +++ b/honeycombio/data_source_query.go @@ -3,6 +3,7 @@ package honeycombio import ( "context" "encoding/json" + "fmt" "strconv" "github.com/hashicorp/go-cty/cty" @@ -85,8 +86,29 @@ func dataSourceHoneycombioQuery() *schema.Resource { ValidateFunc: validation.StringInSlice(validQueryFilterOps, false), }, "value": { - Type: schema.TypeString, - Optional: true, + Type: schema.TypeString, + Description: "The value used for the filter. Use of the explicitly typed `value_*` variants is recommended until the honeycomb API is able to support type inference as initially described in https://github.com/kvrhdn/terraform-provider-honeycombio/issues/27.", + Optional: true, + }, + "value_string": { + Type: schema.TypeString, + Description: "The value used for the filter when the column is a string. Mutually exclusive with `value` and the other `value_*` options", + Optional: true, + }, + "value_integer": { + Type: schema.TypeInt, + Description: "The value used for the filter when the column is an integer. Mutually exclusive with `value` and the other `value_*` options", + Optional: true, + }, + "value_float": { + Type: schema.TypeFloat, + Description: "The value used for the filter when the column is a float. Mutually exclusive with `value` and the other `value_*` options", + Optional: true, + }, + "value_boolean": { + Type: schema.TypeBool, + Description: "The value used for the filter when the column is a boolean. Mutually exclusive with `value` and the other `value_*` options", + Optional: true, }, }, }, @@ -164,31 +186,9 @@ func dataSourceHoneycombioQueryRead(ctx context.Context, d *schema.ResourceData, } } - filterSchemas := d.Get("filter").(*schema.Set).List() - filters := make([]honeycombio.FilterSpec, len(filterSchemas)) - - for i, f := range filterSchemas { - fMap := f.(map[string]interface{}) - - filters[i] = honeycombio.FilterSpec{ - Column: fMap["column"].(string), - Op: honeycombio.FilterOp(fMap["op"].(string)), - Value: fMap["value"].(string), - } - - // Ensure we don't send filter.Value if op is "exists" or - // "does-not-exist". The Honeycomb API will refuse this. - // - // TODO ideally this check is part of the schema (as a ValidateFunc), - // but this is not yet supported by the SDK. - // https://github.com/hashicorp/terraform-plugin-sdk/issues/155#issuecomment-489699737 - filter := filters[i] - if filter.Op == honeycombio.FilterOpExists || filter.Op == honeycombio.FilterOpDoesNotExist { - if filter.Value != "" { - return diag.Errorf("Filter operation %s must not contain a value", filter.Op) - } - filters[i].Value = nil - } + filters, err := extractFilters(d) + if err != nil { + return diag.FromErr(err) } filterCombination := honeycombio.FilterCombination(d.Get("filter_combination").(string)) @@ -284,3 +284,71 @@ func validateQueryJSON(validators ...querySpecValidateDiagFunc) schema.SchemaVal return diagnostics } } + +func extractFilters(d *schema.ResourceData) ([]honeycombio.FilterSpec, error) { + filterSet := d.Get("filter").(*schema.Set) + hashFn := filterSet.F + filters := make([]honeycombio.FilterSpec, filterSet.Len()) + for i, schemaFilter := range filterSet.List() { + honeyFilter, err := extractFilter(d, hashFn(schemaFilter)) + if err != nil { + return nil, err + } + filters[i] = honeyFilter + } + return filters, nil +} + +const multipleValuesError = "must choose one of 'value', 'value_string', 'value_integer', 'value_float', 'value_boolean'" + +func extractFilter(d *schema.ResourceData, id int) (honeycombio.FilterSpec, error) { + var filter honeycombio.FilterSpec + filter.Column = d.Get(fmt.Sprintf("filter.%d.column", id)).(string) + filter.Op = honeycombio.FilterOp(d.Get(fmt.Sprintf("filter.%d.op", id)).(string)) + + valueSet := false + v, vOk := d.GetOk(fmt.Sprintf("filter.%d.value", id)) + if vOk { + filter.Value = v + valueSet = true + } + vs, vsOk := d.GetOk(fmt.Sprintf("filter.%d.value_string", id)) + if vsOk { + if valueSet { + return filter, fmt.Errorf(multipleValuesError) + } + filter.Value = vs + valueSet = true + } + vi, viOk := d.GetOk(fmt.Sprintf("filter.%d.value_integer", id)) + if viOk { + if valueSet { + return filter, fmt.Errorf(multipleValuesError) + } + filter.Value = vi + valueSet = true + } + vf, vfOk := d.GetOk(fmt.Sprintf("filter.%d.value_float", id)) + if vfOk { + if valueSet { + return filter, fmt.Errorf(multipleValuesError) + } + filter.Value = vf + valueSet = true + } + vb, vbOk := d.GetOk(fmt.Sprintf("filter.%d.value_boolean", id)) + if vbOk { + if valueSet { + return filter, fmt.Errorf(multipleValuesError) + } + filter.Value = vb + valueSet = true + } + + if filter.Op == honeycombio.FilterOpExists || filter.Op == honeycombio.FilterOpDoesNotExist { + if filter.Value != nil { + return filter, fmt.Errorf("filter operation %s must not contain a value", filter.Op) + } + } + return filter, nil +} diff --git a/honeycombio/data_source_query_test.go b/honeycombio/data_source_query_test.go index 10ffc6d6..2d8a01ba 100644 --- a/honeycombio/data_source_query_test.go +++ b/honeycombio/data_source_query_test.go @@ -35,6 +35,11 @@ data "honeycombio_query" "test" { column = "trace.parent_id" op = "does-not-exist" } + filter { + column = "duration_ms" + op = ">" + value_integer = 100 + } filter { column = "app.tenant" op = "=" @@ -60,6 +65,7 @@ output "query_json" { }` } +//Note: By default go encodes `<` and `>` for html, hence the `\u003e` const expectedJSON string = `{ "calculations": [ { @@ -72,6 +78,11 @@ const expectedJSON string = `{ "column": "trace.parent_id", "op": "does-not-exist" }, + { + "column": "duration_ms", + "op": "\u003e", + "value": 100 + }, { "column": "app.tenant", "op": "=", @@ -95,15 +106,14 @@ const expectedJSON string = `{ "limit": 250 }` -//Honeycomb API blows up if you send a Value with a FilterOp of `exists` or `does-not-exist` -func TestAccDataSourceHoneycombioQuery_noValueForExists(t *testing.T) { +func TestAccDataSourceHoneycombioQuery_validationChecks(t *testing.T) { resource.ParallelTest(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, Steps: []resource.TestStep{ { Config: testBadExistsQuery(), - ExpectError: regexp.MustCompile("Filter operation exists must not"), + ExpectError: regexp.MustCompile("filter operation exists must not"), }, { Config: testBadCountQuery(), @@ -121,6 +131,10 @@ func TestAccDataSourceHoneycombioQuery_noValueForExists(t *testing.T) { Config: testQueryWithLimit(1200), ExpectError: regexp.MustCompile("expected limit to be in the range \\(1 - 1000\\)"), }, + { + Config: testConflictingValues(), + ExpectError: regexp.MustCompile(multipleValuesError), + }, }, }) } @@ -148,6 +162,19 @@ data "honeycombio_query" "test" { ` } +func testConflictingValues() string { + return ` +data "honeycombio_query" "test" { + filter { + column = "column" + op = ">" + value = "1" + value_integer = 10 + } +} +` +} + func testQueryWithLimit(limit int) string { return fmt.Sprintf(` data "honeycombio_query" "test" { From 6082fe6d8b10ba02ab2597b5a93cb2b29c39aec9 Mon Sep 17 00:00:00 2001 From: Koenraad Verheyden Date: Sat, 22 Aug 2020 13:50:17 +0200 Subject: [PATCH 02/10] terraform fmt the examples --- example/board/main.tf | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/example/board/main.tf b/example/board/main.tf index 7376a2e2..33ee5e8d 100644 --- a/example/board/main.tf +++ b/example/board/main.tf @@ -28,9 +28,9 @@ data "honeycombio_query" "query" { } filter { - column = "app.tenant" - op = "=" - value_string = "ThatSpecialTenant" + column = "app.tenant" + op = "=" + value_string = "ThatSpecialTenant" } } From 7bfa3bae64c2e1f111bdbd87f92cb5457306f60f Mon Sep 17 00:00:00 2001 From: Koenraad Verheyden Date: Sat, 22 Aug 2020 13:53:01 +0200 Subject: [PATCH 03/10] Set global schema.DescriptionKind to markdown --- honeycombio/provider.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/honeycombio/provider.go b/honeycombio/provider.go index c0a5a9d5..9be30dbf 100644 --- a/honeycombio/provider.go +++ b/honeycombio/provider.go @@ -11,6 +11,12 @@ import ( "github.com/kvrhdn/go-honeycombio" ) +func init() { + // set global description kind to markdown, as described in: + // https://www.terraform.io/docs/extend/guides/v2-upgrade-guide.html#support-for-resource-level-and-field-level-descriptions + schema.DescriptionKind = schema.StringMarkdown +} + // providerVersion represents the current version of the provider. It should be // overwritten during the release process. var providerVersion = "dev" From bac341126444e1a05e5534a401c1a4c35e512b97 Mon Sep 17 00:00:00 2001 From: Koenraad Verheyden Date: Sun, 23 Aug 2020 00:41:56 +0200 Subject: [PATCH 04/10] Document query.filter.value_*; deprecate untyped value --- docs/data-sources/query.md | 10 ++++++++-- honeycombio/data_source_query.go | 3 ++- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/docs/data-sources/query.md b/docs/data-sources/query.md index 28c1e328..e4529d77 100644 --- a/docs/data-sources/query.md +++ b/docs/data-sources/query.md @@ -55,8 +55,14 @@ Each query configuration may have zero or more `calculation` blocks, which each Each query configuration may have zero or more `filter` blocks, which each accept the following arguments: * `column` - (Required) The column to apply the filter to. -* `op` - (Required) The operator to apply, see the supported list of filter operators at [Filter Operators](https://docs.honeycomb.io/api/query-specification/#filter-operators). -* `value` - (Optional) The value to be used with the operator, not all operators require a value. +* `op` - (Required) The operator to apply, see the supported list of filter operators at [Filter Operators](https://docs.honeycomb.io/api/query-specification/#filter-operators). Not all operators require a value. +* `value_string` - (Optional) The value used for the filter when the column is a string. Mutually exclusive with `value` and the other `value_*` options. +* `value_integer` - (Optional) The value used for the filter when the column is an integer. Mutually exclusive with `value` and the other `value_*` options. +* `value_float` - (Optional) The value used for the filter when the column is a float. Mutually exclusive with `value` and the other `value_*` options. +* `value_boolean` - (Optional) The value used for the filter when the column is a boolean. Mutually exclusive with `value` and the other `value_*` options. +* `value` - (Optional) Deprecated: use the explicitly typed `value_string` instead. Mutually exclusive with the other `value_*` options. + +-> **NOTE** The type of the filter value should match with the type of the column. To determine the type of a column visit the dataset settings page, all the columns and their type are listed under _Schema_. This provider will not be able to detect invalid combinations. Each query configuration may have zero or more `order` blocks, which each accept the following arguments. An order term can refer to a `calculation` or a column set in `breakdowns`. When referring to a `calculation`, `op` and `column` must be the same as the calculation. diff --git a/honeycombio/data_source_query.go b/honeycombio/data_source_query.go index 45b6aa8a..27752da2 100644 --- a/honeycombio/data_source_query.go +++ b/honeycombio/data_source_query.go @@ -87,8 +87,9 @@ func dataSourceHoneycombioQuery() *schema.Resource { }, "value": { Type: schema.TypeString, - Description: "The value used for the filter. Use of the explicitly typed `value_*` variants is recommended until the honeycomb API is able to support type inference as initially described in https://github.com/kvrhdn/terraform-provider-honeycombio/issues/27.", + Description: "Deprecated: use the explicitly typed `value_string` instead. Mutually exclusive with the other `value_*` options.", Optional: true, + Deprecated: "Use of attribute `value` is discouraged, prefer using the explicitly typed `value_*` variants instead", }, "value_string": { Type: schema.TypeString, From 8fda550fcf8f7a7cf37a501ff34864056f0d5119 Mon Sep 17 00:00:00 2001 From: Koenraad Verheyden Date: Sun, 23 Aug 2020 01:03:00 +0200 Subject: [PATCH 05/10] Validate filter ops have a value when required --- honeycombio/data_source_query.go | 4 ++++ honeycombio/data_source_query_test.go | 15 +++++++++++++++ 2 files changed, 19 insertions(+) diff --git a/honeycombio/data_source_query.go b/honeycombio/data_source_query.go index 27752da2..6291f32f 100644 --- a/honeycombio/data_source_query.go +++ b/honeycombio/data_source_query.go @@ -350,6 +350,10 @@ func extractFilter(d *schema.ResourceData, id int) (honeycombio.FilterSpec, erro if filter.Value != nil { return filter, fmt.Errorf("filter operation %s must not contain a value", filter.Op) } + } else { + if filter.Value == nil { + return filter, fmt.Errorf("filter operation %s requires a value", filter.Op) + } } return filter, nil } diff --git a/honeycombio/data_source_query_test.go b/honeycombio/data_source_query_test.go index 2d8a01ba..62260d07 100644 --- a/honeycombio/data_source_query_test.go +++ b/honeycombio/data_source_query_test.go @@ -135,6 +135,10 @@ func TestAccDataSourceHoneycombioQuery_validationChecks(t *testing.T) { Config: testConflictingValues(), ExpectError: regexp.MustCompile(multipleValuesError), }, + { + Config: testMissingFilterValue(), + ExpectError: regexp.MustCompile("filter operation > requires a value"), + }, }, }) } @@ -175,6 +179,17 @@ data "honeycombio_query" "test" { ` } +func testMissingFilterValue() string { + return ` +data "honeycombio_query" "test" { + filter { + column = "column" + op = ">" + } +} +` +} + func testQueryWithLimit(limit int) string { return fmt.Sprintf(` data "honeycombio_query" "test" { From b1cb029aeb634c77b794e0b42bad1f059c2cdb0d Mon Sep 17 00:00:00 2001 From: Koenraad Verheyden Date: Sun, 23 Aug 2020 01:39:39 +0200 Subject: [PATCH 06/10] Switch query.filters to (ordered) TypeList instead of TypeSet --- honeycombio/data_source_query.go | 29 +++++++++++++++-------------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/honeycombio/data_source_query.go b/honeycombio/data_source_query.go index 6291f32f..7d8fbde5 100644 --- a/honeycombio/data_source_query.go +++ b/honeycombio/data_source_query.go @@ -72,7 +72,7 @@ func dataSourceHoneycombioQuery() *schema.Resource { }, }, "filter": { - Type: schema.TypeSet, + Type: schema.TypeList, Optional: true, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ @@ -287,11 +287,11 @@ func validateQueryJSON(validators ...querySpecValidateDiagFunc) schema.SchemaVal } func extractFilters(d *schema.ResourceData) ([]honeycombio.FilterSpec, error) { - filterSet := d.Get("filter").(*schema.Set) - hashFn := filterSet.F - filters := make([]honeycombio.FilterSpec, filterSet.Len()) - for i, schemaFilter := range filterSet.List() { - honeyFilter, err := extractFilter(d, hashFn(schemaFilter)) + filterSchemas := d.Get("filter").([]interface{}) + filters := make([]honeycombio.FilterSpec, len(filterSchemas)) + + for i := range filterSchemas { + honeyFilter, err := extractFilter(d, i) if err != nil { return nil, err } @@ -302,18 +302,19 @@ func extractFilters(d *schema.ResourceData) ([]honeycombio.FilterSpec, error) { const multipleValuesError = "must choose one of 'value', 'value_string', 'value_integer', 'value_float', 'value_boolean'" -func extractFilter(d *schema.ResourceData, id int) (honeycombio.FilterSpec, error) { +func extractFilter(d *schema.ResourceData, index int) (honeycombio.FilterSpec, error) { var filter honeycombio.FilterSpec - filter.Column = d.Get(fmt.Sprintf("filter.%d.column", id)).(string) - filter.Op = honeycombio.FilterOp(d.Get(fmt.Sprintf("filter.%d.op", id)).(string)) + + filter.Column = d.Get(fmt.Sprintf("filter.%d.column", index)).(string) + filter.Op = honeycombio.FilterOp(d.Get(fmt.Sprintf("filter.%d.op", index)).(string)) valueSet := false - v, vOk := d.GetOk(fmt.Sprintf("filter.%d.value", id)) + v, vOk := d.GetOk(fmt.Sprintf("filter.%d.value", index)) if vOk { filter.Value = v valueSet = true } - vs, vsOk := d.GetOk(fmt.Sprintf("filter.%d.value_string", id)) + vs, vsOk := d.GetOk(fmt.Sprintf("filter.%d.value_string", index)) if vsOk { if valueSet { return filter, fmt.Errorf(multipleValuesError) @@ -321,7 +322,7 @@ func extractFilter(d *schema.ResourceData, id int) (honeycombio.FilterSpec, erro filter.Value = vs valueSet = true } - vi, viOk := d.GetOk(fmt.Sprintf("filter.%d.value_integer", id)) + vi, viOk := d.GetOk(fmt.Sprintf("filter.%d.value_integer", index)) if viOk { if valueSet { return filter, fmt.Errorf(multipleValuesError) @@ -329,7 +330,7 @@ func extractFilter(d *schema.ResourceData, id int) (honeycombio.FilterSpec, erro filter.Value = vi valueSet = true } - vf, vfOk := d.GetOk(fmt.Sprintf("filter.%d.value_float", id)) + vf, vfOk := d.GetOk(fmt.Sprintf("filter.%d.value_float", index)) if vfOk { if valueSet { return filter, fmt.Errorf(multipleValuesError) @@ -337,7 +338,7 @@ func extractFilter(d *schema.ResourceData, id int) (honeycombio.FilterSpec, erro filter.Value = vf valueSet = true } - vb, vbOk := d.GetOk(fmt.Sprintf("filter.%d.value_boolean", id)) + vb, vbOk := d.GetOk(fmt.Sprintf("filter.%d.value_boolean", index)) if vbOk { if valueSet { return filter, fmt.Errorf(multipleValuesError) From b13f086cf38711f0938221773e0cf8875d211e41 Mon Sep 17 00:00:00 2001 From: Koenraad Verheyden Date: Sun, 23 Aug 2020 03:16:05 +0200 Subject: [PATCH 07/10] Add explicit warning about value breaking filters on non-string columns Co-authored-by: Andrew Fitzgerald --- honeycombio/data_source_query.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/honeycombio/data_source_query.go b/honeycombio/data_source_query.go index 7d8fbde5..a72fa92d 100644 --- a/honeycombio/data_source_query.go +++ b/honeycombio/data_source_query.go @@ -87,7 +87,7 @@ func dataSourceHoneycombioQuery() *schema.Resource { }, "value": { Type: schema.TypeString, - Description: "Deprecated: use the explicitly typed `value_string` instead. Mutually exclusive with the other `value_*` options.", + Description: "Deprecated: use the explicitly typed `value_string` instead. This variant will potentially break dashboards if used with non-string columns. Mutually exclusive with the other `value_*` options.", Optional: true, Deprecated: "Use of attribute `value` is discouraged, prefer using the explicitly typed `value_*` variants instead", }, From f093b164aa7ea57c33d5fd34a4c307c22b26160e Mon Sep 17 00:00:00 2001 From: Koenraad Verheyden Date: Sun, 23 Aug 2020 03:16:15 +0200 Subject: [PATCH 08/10] Add explicit warning about value breaking filters on non-string columns Co-authored-by: Andrew Fitzgerald --- honeycombio/data_source_query.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/honeycombio/data_source_query.go b/honeycombio/data_source_query.go index a72fa92d..015e5584 100644 --- a/honeycombio/data_source_query.go +++ b/honeycombio/data_source_query.go @@ -89,7 +89,7 @@ func dataSourceHoneycombioQuery() *schema.Resource { Type: schema.TypeString, Description: "Deprecated: use the explicitly typed `value_string` instead. This variant will potentially break dashboards if used with non-string columns. Mutually exclusive with the other `value_*` options.", Optional: true, - Deprecated: "Use of attribute `value` is discouraged, prefer using the explicitly typed `value_*` variants instead", + Deprecated: "Use of attribute `value` is discouraged and will potentially break dashboards if used with non-string columns. The explicitly typed `value_*` variants are preferred instead.", }, "value_string": { Type: schema.TypeString, From 2066bafa3bcd9c265bd9f0a0f8282508079cc050 Mon Sep 17 00:00:00 2001 From: Koenraad Verheyden Date: Sun, 23 Aug 2020 03:16:49 +0200 Subject: [PATCH 09/10] Add explicit warning about value breaking filters on non-string columns Co-authored-by: Andrew Fitzgerald --- docs/data-sources/query.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/data-sources/query.md b/docs/data-sources/query.md index e4529d77..610aa4fe 100644 --- a/docs/data-sources/query.md +++ b/docs/data-sources/query.md @@ -60,7 +60,7 @@ Each query configuration may have zero or more `filter` blocks, which each accep * `value_integer` - (Optional) The value used for the filter when the column is an integer. Mutually exclusive with `value` and the other `value_*` options. * `value_float` - (Optional) The value used for the filter when the column is a float. Mutually exclusive with `value` and the other `value_*` options. * `value_boolean` - (Optional) The value used for the filter when the column is a boolean. Mutually exclusive with `value` and the other `value_*` options. -* `value` - (Optional) Deprecated: use the explicitly typed `value_string` instead. Mutually exclusive with the other `value_*` options. +* `value` - (Optional) Deprecated: use the explicitly typed `value_string` instead. This variant will potentially break dashboards if used with non-string columns. Mutually exclusive with the other `value_*` options. -> **NOTE** The type of the filter value should match with the type of the column. To determine the type of a column visit the dataset settings page, all the columns and their type are listed under _Schema_. This provider will not be able to detect invalid combinations. From 1a97b170aa8e0ead08d39de4fe30dc26ac38a79e Mon Sep 17 00:00:00 2001 From: Koenraad Verheyden Date: Sun, 23 Aug 2020 03:20:56 +0200 Subject: [PATCH 10/10] Tweak descriptions a bit --- docs/data-sources/query.md | 2 +- honeycombio/data_source_query.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/data-sources/query.md b/docs/data-sources/query.md index 610aa4fe..af7965cf 100644 --- a/docs/data-sources/query.md +++ b/docs/data-sources/query.md @@ -60,7 +60,7 @@ Each query configuration may have zero or more `filter` blocks, which each accep * `value_integer` - (Optional) The value used for the filter when the column is an integer. Mutually exclusive with `value` and the other `value_*` options. * `value_float` - (Optional) The value used for the filter when the column is a float. Mutually exclusive with `value` and the other `value_*` options. * `value_boolean` - (Optional) The value used for the filter when the column is a boolean. Mutually exclusive with `value` and the other `value_*` options. -* `value` - (Optional) Deprecated: use the explicitly typed `value_string` instead. This variant will potentially break dashboards if used with non-string columns. Mutually exclusive with the other `value_*` options. +* `value` - (Optional) Deprecated: use the explicitly typed `value_string` instead. This variant will break queries when used with non-string columns. Mutually exclusive with the other `value_*` options. -> **NOTE** The type of the filter value should match with the type of the column. To determine the type of a column visit the dataset settings page, all the columns and their type are listed under _Schema_. This provider will not be able to detect invalid combinations. diff --git a/honeycombio/data_source_query.go b/honeycombio/data_source_query.go index 015e5584..2e0a76c0 100644 --- a/honeycombio/data_source_query.go +++ b/honeycombio/data_source_query.go @@ -87,9 +87,9 @@ func dataSourceHoneycombioQuery() *schema.Resource { }, "value": { Type: schema.TypeString, - Description: "Deprecated: use the explicitly typed `value_string` instead. This variant will potentially break dashboards if used with non-string columns. Mutually exclusive with the other `value_*` options.", + Description: "Deprecated: use the explicitly typed `value_string` instead. This variant will break queries when used with non-string columns. Mutually exclusive with the other `value_*` options.", Optional: true, - Deprecated: "Use of attribute `value` is discouraged and will potentially break dashboards if used with non-string columns. The explicitly typed `value_*` variants are preferred instead.", + Deprecated: "Use of attribute `value` is discouraged and will break queries when used with non-string columns. The explicitly typed `value_*` variants are preferred instead.", }, "value_string": { Type: schema.TypeString,