From d21d73b292d8639cad808c267e6eb0302150c860 Mon Sep 17 00:00:00 2001 From: Matthew Frahry Date: Wed, 27 Jan 2021 13:15:59 -0800 Subject: [PATCH] Add ForceNew to various azurerm_iot_time_series_insights_reference_data_set attributes --- ...ot_time_series_insights_reference_data_set_resource.go | 4 ++++ ...me_series_insights_reference_data_set_resource_test.go | 5 ----- ..._time_series_insights_reference_data_set.html.markdown | 8 ++++---- 3 files changed, 8 insertions(+), 9 deletions(-) diff --git a/azurerm/internal/services/iottimeseriesinsights/iot_time_series_insights_reference_data_set_resource.go b/azurerm/internal/services/iottimeseriesinsights/iot_time_series_insights_reference_data_set_resource.go index 628a2ccfe6d3..025d9f9fa701 100644 --- a/azurerm/internal/services/iottimeseriesinsights/iot_time_series_insights_reference_data_set_resource.go +++ b/azurerm/internal/services/iottimeseriesinsights/iot_time_series_insights_reference_data_set_resource.go @@ -59,6 +59,7 @@ func resourceIoTTimeSeriesInsightsReferenceDataSet() *schema.Resource { "data_string_comparison_behavior": { Type: schema.TypeString, Optional: true, + ForceNew: true, Default: string(timeseriesinsights.Ordinal), ValidateFunc: validation.StringInSlice([]string{ string(timeseriesinsights.Ordinal), @@ -69,16 +70,19 @@ func resourceIoTTimeSeriesInsightsReferenceDataSet() *schema.Resource { "key_property": { Type: schema.TypeSet, Required: true, + ForceNew: true, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "name": { Type: schema.TypeString, Required: true, + ForceNew: true, ValidateFunc: validation.StringIsNotEmpty, }, "type": { Type: schema.TypeString, Required: true, + ForceNew: true, ValidateFunc: validation.StringInSlice([]string{ string(timeseriesinsights.ReferenceDataKeyPropertyTypeBool), string(timeseriesinsights.ReferenceDataKeyPropertyTypeDateTime), diff --git a/azurerm/internal/services/iottimeseriesinsights/iot_time_series_insights_reference_data_set_resource_test.go b/azurerm/internal/services/iottimeseriesinsights/iot_time_series_insights_reference_data_set_resource_test.go index b37d743ec543..54c49e333f79 100644 --- a/azurerm/internal/services/iottimeseriesinsights/iot_time_series_insights_reference_data_set_resource_test.go +++ b/azurerm/internal/services/iottimeseriesinsights/iot_time_series_insights_reference_data_set_resource_test.go @@ -131,11 +131,6 @@ resource "azurerm_iot_time_series_insights_reference_data_set" "test" { type = "String" } - key_property { - name = "keyProperty2" - type = "Bool" - } - tags = { Environment = "Production" } diff --git a/website/docs/r/iot_time_series_insights_reference_data_set.html.markdown b/website/docs/r/iot_time_series_insights_reference_data_set.html.markdown index 3f59dd26f477..37d983fa0456 100644 --- a/website/docs/r/iot_time_series_insights_reference_data_set.html.markdown +++ b/website/docs/r/iot_time_series_insights_reference_data_set.html.markdown @@ -46,9 +46,9 @@ The following arguments are supported: * `location` - (Required) Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. -* `data_string_comparison_behavior` - (Optional) The comparison behavior that will be used to compare keys. Valid values include `Ordinal` and `OrdinalIgnoreCase`. Defaults to `Ordinal`. +* `data_string_comparison_behavior` - (Optional) The comparison behavior that will be used to compare keys. Valid values include `Ordinal` and `OrdinalIgnoreCase`. Defaults to `Ordinal`. Changing this forces a new resource to be created. -* `key_property` - (Optional) A `key_property` block as defined below. +* `key_property` - (Optional) A `key_property` block as defined below. Changing this forces a new resource to be created. * `tags` - (Optional) A mapping of tags to assign to the resource. @@ -56,9 +56,9 @@ The following arguments are supported: A `key_property` block supports the following: -* `name`- (Required) The name of the key property. +* `name`- (Required) The name of the key property. Changing this forces a new resource to be created. -* `type` - (Required) The data type of the key property. Valid values include `Bool`, `DateTime`, `Double`, `String`. +* `type` - (Required) The data type of the key property. Valid values include `Bool`, `DateTime`, `Double`, `String`. Changing this forces a new resource to be created. ## Attributes Reference