Skip to content

Commit 9934cf2

Browse files
Add google_chronicle_watchlist resource to chronicle (#12648) (#20799)
[upstream:c809b03b784e13e62ee172da8598a396f4052116] Signed-off-by: Modular Magician <[email protected]>
1 parent dd86703 commit 9934cf2

File tree

5 files changed

+208
-0
lines changed

5 files changed

+208
-0
lines changed

.changelog/12648.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
```release-note:new-resource
2+
`google_chronicle_watchlist` (beta)
3+
```

.teamcity/components/inputs/services_beta.kt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,11 @@ var ServicesListBeta = mapOf(
141141
"displayName" to "Certificatemanager",
142142
"path" to "./google-beta/services/certificatemanager"
143143
),
144+
"chronicle" to mapOf(
145+
"name" to "chronicle",
146+
"displayName" to "Chronicle",
147+
"path" to "./google-beta/services/chronicle"
148+
),
144149
"cloudasset" to mapOf(
145150
"name" to "cloudasset",
146151
"displayName" to "Cloudasset",

.teamcity/components/inputs/services_ga.kt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,11 @@ var ServicesListGa = mapOf(
141141
"displayName" to "Certificatemanager",
142142
"path" to "./google/services/certificatemanager"
143143
),
144+
"chronicle" to mapOf(
145+
"name" to "chronicle",
146+
"displayName" to "Chronicle",
147+
"path" to "./google/services/chronicle"
148+
),
144149
"cloudasset" to mapOf(
145150
"name" to "cloudasset",
146151
"displayName" to "Cloudasset",
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
// Copyright (c) HashiCorp, Inc.
2+
// SPDX-License-Identifier: MPL-2.0
3+
package chronicle_test
Lines changed: 192 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,192 @@
1+
---
2+
# ----------------------------------------------------------------------------
3+
#
4+
# *** AUTO GENERATED CODE *** Type: MMv1 ***
5+
#
6+
# ----------------------------------------------------------------------------
7+
#
8+
# This file is automatically generated by Magic Modules and manual
9+
# changes will be clobbered when the file is regenerated.
10+
#
11+
# Please read more about how to change this file in
12+
# .github/CONTRIBUTING.md.
13+
#
14+
# ----------------------------------------------------------------------------
15+
subcategory: "Chronicle"
16+
description: |-
17+
A watchlist is a list of entities that allows for bulk operations over the included entities.
18+
---
19+
20+
# google_chronicle_watchlist
21+
22+
A watchlist is a list of entities that allows for bulk operations over the included entities.
23+
24+
~> **Warning:** This resource is in beta, and should be used with the terraform-provider-google-beta provider.
25+
See [Provider Versions](https://terraform.io/docs/providers/google/guides/provider_versions.html) for more details on beta resources.
26+
27+
To get more information about Watchlist, see:
28+
29+
* [API documentation](https://cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.watchlists)
30+
* How-to Guides
31+
* [Google SecOps Guides](https://cloud.google.com/chronicle/docs/secops/secops-overview)
32+
33+
## Example Usage - Chronicle Watchlist Basic
34+
35+
36+
```hcl
37+
resource "google_chronicle_watchlist" "example" {
38+
provider = "google-beta"
39+
location = "us"
40+
instance = "00000000-0000-0000-0000-000000000000"
41+
watchlist_id = "watchlist-name"
42+
description = "watchlist-description"
43+
display_name = "watchlist-name"
44+
multiplying_factor = 1
45+
entity_population_mechanism {
46+
manual {
47+
48+
}
49+
}
50+
watchlist_user_preferences {
51+
pinned = true
52+
}
53+
}
54+
```
55+
56+
## Argument Reference
57+
58+
The following arguments are supported:
59+
60+
61+
* `display_name` -
62+
(Required)
63+
Required. Display name of the watchlist.
64+
Note that it must be at least one character and less than 63 characters
65+
(https://google.aip.dev/148).
66+
67+
* `entity_population_mechanism` -
68+
(Required)
69+
Mechanism to populate entities in the watchlist.
70+
Structure is [documented below](#nested_entity_population_mechanism).
71+
72+
* `location` -
73+
(Required)
74+
The location of the resource. This is the geographical region where the Chronicle instance resides, such as "us" or "europe-west2".
75+
76+
* `instance` -
77+
(Required)
78+
The unique identifier for the Chronicle instance, which is the same as the customer ID.
79+
80+
* `watchlist_id` -
81+
(Required)
82+
Optional. The ID to use for the watchlist,
83+
which will become the final component of the watchlist's resource name.
84+
This value should be 4-63 characters, and valid characters
85+
are /a-z-/.
86+
87+
88+
<a name="nested_entity_population_mechanism"></a>The `entity_population_mechanism` block supports:
89+
90+
* `manual` -
91+
(Optional)
92+
Entities are added manually.
93+
94+
- - -
95+
96+
97+
* `multiplying_factor` -
98+
(Optional)
99+
Optional. Weight applied to the risk score for entities
100+
in this watchlist.
101+
The default is 1.0 if it is not specified.
102+
103+
* `description` -
104+
(Optional)
105+
Optional. Description of the watchlist.
106+
107+
* `watchlist_user_preferences` -
108+
(Optional)
109+
A collection of user preferences for watchlist UI configuration.
110+
Structure is [documented below](#nested_watchlist_user_preferences).
111+
112+
* `project` - (Optional) The ID of the project in which the resource belongs.
113+
If it is not provided, the provider project is used.
114+
115+
116+
<a name="nested_watchlist_user_preferences"></a>The `watchlist_user_preferences` block supports:
117+
118+
* `pinned` -
119+
(Optional)
120+
Optional. Whether the watchlist is pinned on the dashboard.
121+
122+
## Attributes Reference
123+
124+
In addition to the arguments listed above, the following computed attributes are exported:
125+
126+
* `id` - an identifier for the resource with format `projects/{{project}}/locations/{{location}}/instances/{{instance}}/watchlists/{{watchlist_id}}`
127+
128+
* `name` -
129+
Identifier. Resource name of the watchlist. This unique identifier is generated using values provided for the URL parameters.
130+
Format:
131+
projects/{project}/locations/{location}/instances/{instance}/watchlists/{watchlist}
132+
133+
* `create_time` -
134+
Output only. Time the watchlist was created.
135+
136+
* `update_time` -
137+
Output only. Time the watchlist was last updated.
138+
139+
* `entity_count` -
140+
Count of different types of entities in the watchlist.
141+
Structure is [documented below](#nested_entity_count).
142+
143+
144+
<a name="nested_entity_count"></a>The `entity_count` block contains:
145+
146+
* `user` -
147+
(Output)
148+
Output only. Count of user type entities in the watchlist.
149+
150+
* `asset` -
151+
(Output)
152+
Output only. Count of asset type entities in the watchlist.
153+
154+
## Timeouts
155+
156+
This resource provides the following
157+
[Timeouts](https://developer.hashicorp.com/terraform/plugin/sdkv2/resources/retries-and-customizable-timeouts) configuration options:
158+
159+
- `create` - Default is 20 minutes.
160+
- `update` - Default is 20 minutes.
161+
- `delete` - Default is 20 minutes.
162+
163+
## Import
164+
165+
166+
Watchlist can be imported using any of these accepted formats:
167+
168+
* `projects/{{project}}/locations/{{location}}/instances/{{instance}}/watchlists/{{watchlist_id}}`
169+
* `{{project}}/{{location}}/{{instance}}/{{watchlist_id}}`
170+
* `{{location}}/{{instance}}/{{watchlist_id}}`
171+
172+
173+
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:
174+
175+
```tf
176+
import {
177+
id = "projects/{{project}}/locations/{{location}}/instances/{{instance}}/watchlists/{{watchlist_id}}"
178+
to = google_chronicle_watchlist.default
179+
}
180+
```
181+
182+
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:
183+
184+
```
185+
$ terraform import google_chronicle_watchlist.default projects/{{project}}/locations/{{location}}/instances/{{instance}}/watchlists/{{watchlist_id}}
186+
$ terraform import google_chronicle_watchlist.default {{project}}/{{location}}/{{instance}}/{{watchlist_id}}
187+
$ terraform import google_chronicle_watchlist.default {{location}}/{{instance}}/{{watchlist_id}}
188+
```
189+
190+
## User Project Overrides
191+
192+
This resource supports [User Project Overrides](https://registry.terraform.io/providers/hashicorp/google/latest/docs/guides/provider_reference#user_project_override).

0 commit comments

Comments
 (0)