Skip to content

Commit

Permalink
naming
Browse files Browse the repository at this point in the history
  • Loading branch information
magodo committed Mar 17, 2022
1 parent 7f857d9 commit e7cfdf0
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion examples/sentinel/watchlist-item-from-csv-file/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
8 changes: 4 additions & 4 deletions internal/services/sentinel/sentinel_watchlist_resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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,
Expand Down Expand Up @@ -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),
},
}

Expand Down Expand Up @@ -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
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand All @@ -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)
}
Expand All @@ -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)
}
Expand Down
2 changes: 1 addition & 1 deletion website/docs/r/sentinel_watchlist.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -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.

---

Expand Down

0 comments on commit e7cfdf0

Please sign in to comment.