-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
[upstream:c809b03b784e13e62ee172da8598a396f4052116] Signed-off-by: Modular Magician <magic-modules@google.com>
- Loading branch information
1 parent
dd86703
commit 9934cf2
Showing
5 changed files
with
208 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
```release-note:new-resource | ||
`google_chronicle_watchlist` (beta) | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 3 additions & 0 deletions
3
google/services/chronicle/resource_chronicle_watchlist_test.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
// Copyright (c) HashiCorp, Inc. | ||
// SPDX-License-Identifier: MPL-2.0 | ||
package chronicle_test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,192 @@ | ||
--- | ||
# ---------------------------------------------------------------------------- | ||
# | ||
# *** AUTO GENERATED CODE *** Type: MMv1 *** | ||
# | ||
# ---------------------------------------------------------------------------- | ||
# | ||
# This file is automatically generated by Magic Modules and manual | ||
# changes will be clobbered when the file is regenerated. | ||
# | ||
# Please read more about how to change this file in | ||
# .github/CONTRIBUTING.md. | ||
# | ||
# ---------------------------------------------------------------------------- | ||
subcategory: "Chronicle" | ||
description: |- | ||
A watchlist is a list of entities that allows for bulk operations over the included entities. | ||
--- | ||
|
||
# google_chronicle_watchlist | ||
|
||
A watchlist is a list of entities that allows for bulk operations over the included entities. | ||
|
||
~> **Warning:** This resource is in beta, and should be used with the terraform-provider-google-beta provider. | ||
See [Provider Versions](https://terraform.io/docs/providers/google/guides/provider_versions.html) for more details on beta resources. | ||
|
||
To get more information about Watchlist, see: | ||
|
||
* [API documentation](https://cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.watchlists) | ||
* How-to Guides | ||
* [Google SecOps Guides](https://cloud.google.com/chronicle/docs/secops/secops-overview) | ||
|
||
## Example Usage - Chronicle Watchlist Basic | ||
|
||
|
||
```hcl | ||
resource "google_chronicle_watchlist" "example" { | ||
provider = "google-beta" | ||
location = "us" | ||
instance = "00000000-0000-0000-0000-000000000000" | ||
watchlist_id = "watchlist-name" | ||
description = "watchlist-description" | ||
display_name = "watchlist-name" | ||
multiplying_factor = 1 | ||
entity_population_mechanism { | ||
manual { | ||
} | ||
} | ||
watchlist_user_preferences { | ||
pinned = true | ||
} | ||
} | ||
``` | ||
|
||
## Argument Reference | ||
|
||
The following arguments are supported: | ||
|
||
|
||
* `display_name` - | ||
(Required) | ||
Required. Display name of the watchlist. | ||
Note that it must be at least one character and less than 63 characters | ||
(https://google.aip.dev/148). | ||
|
||
* `entity_population_mechanism` - | ||
(Required) | ||
Mechanism to populate entities in the watchlist. | ||
Structure is [documented below](#nested_entity_population_mechanism). | ||
|
||
* `location` - | ||
(Required) | ||
The location of the resource. This is the geographical region where the Chronicle instance resides, such as "us" or "europe-west2". | ||
|
||
* `instance` - | ||
(Required) | ||
The unique identifier for the Chronicle instance, which is the same as the customer ID. | ||
|
||
* `watchlist_id` - | ||
(Required) | ||
Optional. The ID to use for the watchlist, | ||
which will become the final component of the watchlist's resource name. | ||
This value should be 4-63 characters, and valid characters | ||
are /a-z-/. | ||
|
||
|
||
<a name="nested_entity_population_mechanism"></a>The `entity_population_mechanism` block supports: | ||
|
||
* `manual` - | ||
(Optional) | ||
Entities are added manually. | ||
|
||
- - - | ||
|
||
|
||
* `multiplying_factor` - | ||
(Optional) | ||
Optional. Weight applied to the risk score for entities | ||
in this watchlist. | ||
The default is 1.0 if it is not specified. | ||
|
||
* `description` - | ||
(Optional) | ||
Optional. Description of the watchlist. | ||
|
||
* `watchlist_user_preferences` - | ||
(Optional) | ||
A collection of user preferences for watchlist UI configuration. | ||
Structure is [documented below](#nested_watchlist_user_preferences). | ||
|
||
* `project` - (Optional) The ID of the project in which the resource belongs. | ||
If it is not provided, the provider project is used. | ||
|
||
|
||
<a name="nested_watchlist_user_preferences"></a>The `watchlist_user_preferences` block supports: | ||
|
||
* `pinned` - | ||
(Optional) | ||
Optional. Whether the watchlist is pinned on the dashboard. | ||
|
||
## Attributes Reference | ||
|
||
In addition to the arguments listed above, the following computed attributes are exported: | ||
|
||
* `id` - an identifier for the resource with format `projects/{{project}}/locations/{{location}}/instances/{{instance}}/watchlists/{{watchlist_id}}` | ||
|
||
* `name` - | ||
Identifier. Resource name of the watchlist. This unique identifier is generated using values provided for the URL parameters. | ||
Format: | ||
projects/{project}/locations/{location}/instances/{instance}/watchlists/{watchlist} | ||
|
||
* `create_time` - | ||
Output only. Time the watchlist was created. | ||
|
||
* `update_time` - | ||
Output only. Time the watchlist was last updated. | ||
|
||
* `entity_count` - | ||
Count of different types of entities in the watchlist. | ||
Structure is [documented below](#nested_entity_count). | ||
|
||
|
||
<a name="nested_entity_count"></a>The `entity_count` block contains: | ||
|
||
* `user` - | ||
(Output) | ||
Output only. Count of user type entities in the watchlist. | ||
|
||
* `asset` - | ||
(Output) | ||
Output only. Count of asset type entities in the watchlist. | ||
|
||
## Timeouts | ||
|
||
This resource provides the following | ||
[Timeouts](https://developer.hashicorp.com/terraform/plugin/sdkv2/resources/retries-and-customizable-timeouts) configuration options: | ||
|
||
- `create` - Default is 20 minutes. | ||
- `update` - Default is 20 minutes. | ||
- `delete` - Default is 20 minutes. | ||
|
||
## Import | ||
|
||
|
||
Watchlist can be imported using any of these accepted formats: | ||
|
||
* `projects/{{project}}/locations/{{location}}/instances/{{instance}}/watchlists/{{watchlist_id}}` | ||
* `{{project}}/{{location}}/{{instance}}/{{watchlist_id}}` | ||
* `{{location}}/{{instance}}/{{watchlist_id}}` | ||
|
||
|
||
In Terraform v1.5.0 and later, use an [`import` block](https://developer.hashicorp.com/terraform/language/import) to import Watchlist using one of the formats above. For example: | ||
|
||
```tf | ||
import { | ||
id = "projects/{{project}}/locations/{{location}}/instances/{{instance}}/watchlists/{{watchlist_id}}" | ||
to = google_chronicle_watchlist.default | ||
} | ||
``` | ||
|
||
When using the [`terraform import` command](https://developer.hashicorp.com/terraform/cli/commands/import), Watchlist can be imported using one of the formats above. For example: | ||
|
||
``` | ||
$ terraform import google_chronicle_watchlist.default projects/{{project}}/locations/{{location}}/instances/{{instance}}/watchlists/{{watchlist_id}} | ||
$ terraform import google_chronicle_watchlist.default {{project}}/{{location}}/{{instance}}/{{watchlist_id}} | ||
$ terraform import google_chronicle_watchlist.default {{location}}/{{instance}}/{{watchlist_id}} | ||
``` | ||
|
||
## User Project Overrides | ||
|
||
This resource supports [User Project Overrides](https://registry.terraform.io/providers/hashicorp/google/latest/docs/guides/provider_reference#user_project_override). |