From e7cfdf0af2cebdb86c4a63631c9317e9486e0b81 Mon Sep 17 00:00:00 2001 From: magodo Date: Thu, 17 Mar 2022 17:15:23 +0800 Subject: [PATCH] naming --- examples/sentinel/watchlist-item-from-csv-file/main.tf | 2 +- .../sentinel/sentinel_watchlist_item_resource_test.go | 2 +- internal/services/sentinel/sentinel_watchlist_resource.go | 8 ++++---- .../services/sentinel/sentinel_watchlist_resource_test.go | 6 +++--- website/docs/r/sentinel_watchlist.html.markdown | 2 +- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/examples/sentinel/watchlist-item-from-csv-file/main.tf b/examples/sentinel/watchlist-item-from-csv-file/main.tf index e74cbdd096b0..44dabea145a9 100644 --- a/examples/sentinel/watchlist-item-from-csv-file/main.tf +++ b/examples/sentinel/watchlist-item-from-csv-file/main.tf @@ -32,7 +32,7 @@ resource "azurerm_sentinel_watchlist" "example" { name = "example-watchlist" log_analytics_workspace_id = azurerm_log_analytics_solution.example.workspace_resource_id display_name = "example-wl" - item_search_key = "Key" + items_search_key = "Key" } locals { diff --git a/internal/services/sentinel/sentinel_watchlist_item_resource_test.go b/internal/services/sentinel/sentinel_watchlist_item_resource_test.go index 5f5bd1830224..a83a1030e977 100644 --- a/internal/services/sentinel/sentinel_watchlist_item_resource_test.go +++ b/internal/services/sentinel/sentinel_watchlist_item_resource_test.go @@ -170,7 +170,7 @@ resource "azurerm_sentinel_watchlist" "test" { name = "accTestWL-%d" log_analytics_workspace_id = azurerm_log_analytics_solution.sentinel.workspace_resource_id display_name = "test" - item_search_key = "k1" + items_search_key = "k1" } `, data.RandomInteger, data.Locations.Primary, data.RandomInteger, data.RandomInteger) } diff --git a/internal/services/sentinel/sentinel_watchlist_resource.go b/internal/services/sentinel/sentinel_watchlist_resource.go index a210726c46c8..88dd08c82964 100644 --- a/internal/services/sentinel/sentinel_watchlist_resource.go +++ b/internal/services/sentinel/sentinel_watchlist_resource.go @@ -28,7 +28,7 @@ type WatchlistModel struct { Description string `tfschema:"description"` Labels []string `tfschema:"labels"` DefaultDuration string `tfschema:"default_duration"` - ItemSearchKey string `tfschema:"item_search_key"` + ItemsSearchKey string `tfschema:"items_search_key"` } func (r WatchlistResource) Arguments() map[string]*pluginsdk.Schema { @@ -51,7 +51,7 @@ func (r WatchlistResource) Arguments() map[string]*pluginsdk.Schema { ForceNew: true, ValidateFunc: validation.StringIsNotEmpty, }, - "item_search_key": { + "items_search_key": { Type: pluginsdk.TypeString, Required: true, ForceNew: true, @@ -135,7 +135,7 @@ func (r WatchlistResource) Create() sdk.ResourceFunc { // Setting them here is merely to make the API happy. Source: securityinsight.Source("a.csv"), - ItemsSearchKey: utils.String(model.ItemSearchKey), + ItemsSearchKey: utils.String(model.ItemsSearchKey), }, } @@ -198,7 +198,7 @@ func (r WatchlistResource) Read() sdk.ResourceFunc { model.DefaultDuration = *props.DefaultDuration } if props.ItemsSearchKey != nil { - model.ItemSearchKey = *props.ItemsSearchKey + model.ItemsSearchKey = *props.ItemsSearchKey } } diff --git a/internal/services/sentinel/sentinel_watchlist_resource_test.go b/internal/services/sentinel/sentinel_watchlist_resource_test.go index b168e6efd056..357d8b344936 100644 --- a/internal/services/sentinel/sentinel_watchlist_resource_test.go +++ b/internal/services/sentinel/sentinel_watchlist_resource_test.go @@ -88,7 +88,7 @@ resource "azurerm_sentinel_watchlist" "test" { name = "accTestWL-%d" log_analytics_workspace_id = azurerm_log_analytics_solution.sentinel.workspace_resource_id display_name = "test" - item_search_key = "Key" + items_search_key = "Key" } `, template, data.RandomInteger) } @@ -105,7 +105,7 @@ resource "azurerm_sentinel_watchlist" "test" { description = "description" labels = ["label1", "laebl2"] default_duration = "P2DT3H" - item_search_key = "Key" + items_search_key = "Key" } `, template, data.RandomInteger) } @@ -119,7 +119,7 @@ resource "azurerm_sentinel_watchlist" "import" { name = azurerm_sentinel_watchlist.test.name log_analytics_workspace_id = azurerm_sentinel_watchlist.test.log_analytics_workspace_id display_name = azurerm_sentinel_watchlist.test.display_name - item_search_key = azurerm_sentinel_watchlist.test.item_search_key + items_search_key = azurerm_sentinel_watchlist.test.items_search_key } `, template) } diff --git a/website/docs/r/sentinel_watchlist.html.markdown b/website/docs/r/sentinel_watchlist.html.markdown index 222040ac36c1..f22602aa44aa 100644 --- a/website/docs/r/sentinel_watchlist.html.markdown +++ b/website/docs/r/sentinel_watchlist.html.markdown @@ -56,7 +56,7 @@ The following arguments are supported: * `display_name` - (Required) The display name of this Sentinel Watchlist. Changing this forces a new Sentinel Watchlist to be created. -* `item_search_key` - (Required) The key used to optimize query performance when using Watchlist for joins with other data. Changing this forces a new Sentinel Watchlist to be created. +* `items_search_key` - (Required) The key used to optimize query performance when using Watchlist for joins with other data. Changing this forces a new Sentinel Watchlist to be created. ---