Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

azurerm_iot_time_series_insights_reference_data_set - Add ForceNew to key_property and data_string_comparison_behavior #10343

Merged
merged 1 commit into from
Jan 28, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand All @@ -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),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,19 +46,19 @@ 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.

---

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

Expand Down