|
| 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 | + Retrohunt is an execution of a Rule over a time range in the past. |
| 18 | +--- |
| 19 | + |
| 20 | +# google_chronicle_retrohunt |
| 21 | + |
| 22 | +Retrohunt is an execution of a Rule over a time range in the past. |
| 23 | + |
| 24 | + |
| 25 | +To get more information about Retrohunt, see: |
| 26 | + |
| 27 | +* [API documentation](https://cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.rules.retrohunts) |
| 28 | +* How-to Guides |
| 29 | + * [Google SecOps Guides](https://cloud.google.com/chronicle/docs/secops/secops-overview) |
| 30 | + |
| 31 | +## Example Usage - Chronicle Retrohunt Basic |
| 32 | + |
| 33 | + |
| 34 | +```hcl |
| 35 | +resource "google_chronicle_rule" "my-rule" { |
| 36 | + provider = "google-beta" |
| 37 | + location = "us" |
| 38 | + instance = "00000000-0000-0000-0000-000000000000" |
| 39 | + deletion_policy = "FORCE" |
| 40 | + text = <<-EOT |
| 41 | + rule test_rule { meta: events: $userid = $e.principal.user.userid match: $userid over 10m condition: $e } |
| 42 | + EOT |
| 43 | +} |
| 44 | +
|
| 45 | +resource "google_chronicle_retrohunt" "example" { |
| 46 | + provider = "google-beta" |
| 47 | + location = "us" |
| 48 | + instance = "00000000-0000-0000-0000-000000000000" |
| 49 | + rule = element(split("/", resource.google_chronicle_rule.my-rule.name), length(split("/", resource.google_chronicle_rule.my-rule.name)) - 1) |
| 50 | + process_interval { |
| 51 | + start_time = "2025-01-01T00:00:00Z" |
| 52 | + end_time = "2025-01-01T12:00:00Z" |
| 53 | + } |
| 54 | +} |
| 55 | +``` |
| 56 | + |
| 57 | +## Argument Reference |
| 58 | + |
| 59 | +The following arguments are supported: |
| 60 | + |
| 61 | + |
| 62 | +* `process_interval` - |
| 63 | + (Required) |
| 64 | + Represents a time interval, encoded as a Timestamp start (inclusive) and a |
| 65 | + Timestamp end (exclusive). |
| 66 | + The start must be less than or equal to the end. |
| 67 | + When the start equals the end, the interval is empty (matches no time). |
| 68 | + When both start and end are unspecified, the interval matches any time. |
| 69 | + Structure is [documented below](#nested_process_interval). |
| 70 | + |
| 71 | +* `location` - |
| 72 | + (Required) |
| 73 | + The location of the resource. This is the geographical region where the Chronicle instance resides, such as "us" or "europe-west2". |
| 74 | + |
| 75 | +* `instance` - |
| 76 | + (Required) |
| 77 | + The unique identifier for the Chronicle instance, which is the same as the customer ID. |
| 78 | + |
| 79 | +* `rule` - |
| 80 | + (Required) |
| 81 | + The Rule ID of the rule. |
| 82 | + |
| 83 | + |
| 84 | +<a name="nested_process_interval"></a>The `process_interval` block supports: |
| 85 | + |
| 86 | +* `start_time` - |
| 87 | + (Required) |
| 88 | + Inclusive start of the interval. |
| 89 | + |
| 90 | +* `end_time` - |
| 91 | + (Required) |
| 92 | + Exclusive end of the interval. |
| 93 | + |
| 94 | +- - - |
| 95 | + |
| 96 | + |
| 97 | +* `retrohunt` - |
| 98 | + (Optional) |
| 99 | + The retrohunt ID of the Retrohunt. A retrohunt is an execution of a Rule over a time range in the past. |
| 100 | + |
| 101 | +* `project` - (Optional) The ID of the project in which the resource belongs. |
| 102 | + If it is not provided, the provider project is used. |
| 103 | + |
| 104 | + |
| 105 | +## Attributes Reference |
| 106 | + |
| 107 | +In addition to the arguments listed above, the following computed attributes are exported: |
| 108 | + |
| 109 | +* `id` - an identifier for the resource with format `projects/{{project}}/locations/{{location}}/instances/{{instance}}/rules/{{rule}}/retrohunts/{{retrohunt}}` |
| 110 | + |
| 111 | +* `progress_percentage` - |
| 112 | + Output only. Percent progress of the retrohunt towards completion, from 0.00 to 100.00. |
| 113 | + |
| 114 | +* `name` - |
| 115 | + The resource name of the retrohunt. |
| 116 | + Retrohunt is the child of a rule revision. {rule} in the format below is |
| 117 | + structured as {rule_id@revision_id}. |
| 118 | + Format: |
| 119 | + projects/{project}/locations/{location}/instances/{instance}/rules/{rule}/retrohunts/{retrohunt} |
| 120 | + |
| 121 | +* `execution_interval` - |
| 122 | + Represents a time interval, encoded as a Timestamp start (inclusive) and a |
| 123 | + Timestamp end (exclusive). |
| 124 | + The start must be less than or equal to the end. |
| 125 | + When the start equals the end, the interval is empty (matches no time). |
| 126 | + When both start and end are unspecified, the interval matches any time. |
| 127 | + Structure is [documented below](#nested_execution_interval). |
| 128 | + |
| 129 | +* `state` - |
| 130 | + Output only. The state of the retrohunt. |
| 131 | + Possible values: |
| 132 | + RUNNING |
| 133 | + DONE |
| 134 | + CANCELLED |
| 135 | + FAILED |
| 136 | + |
| 137 | + |
| 138 | +<a name="nested_execution_interval"></a>The `execution_interval` block contains: |
| 139 | + |
| 140 | +* `end_time` - |
| 141 | + (Optional) |
| 142 | + Optional. Exclusive end of the interval. |
| 143 | + If specified, a Timestamp matching this interval will have to be before the |
| 144 | + end. |
| 145 | + |
| 146 | +* `start_time` - |
| 147 | + (Optional) |
| 148 | + Optional. Inclusive start of the interval. |
| 149 | + If specified, a Timestamp matching this interval will have to be the same |
| 150 | + or after the start. |
| 151 | + |
| 152 | +## Timeouts |
| 153 | + |
| 154 | +This resource provides the following |
| 155 | +[Timeouts](https://developer.hashicorp.com/terraform/plugin/sdkv2/resources/retries-and-customizable-timeouts) configuration options: |
| 156 | + |
| 157 | +- `create` - Default is 20 minutes. |
| 158 | +- `delete` - Default is 20 minutes. |
| 159 | + |
| 160 | +## Import |
| 161 | + |
| 162 | + |
| 163 | +Retrohunt can be imported using any of these accepted formats: |
| 164 | + |
| 165 | +* `projects/{{project}}/locations/{{location}}/instances/{{instance}}/rules/{{rule}}/retrohunts/{{retrohunt}}` |
| 166 | +* `{{project}}/{{location}}/{{instance}}/{{rule}}/{{retrohunt}}` |
| 167 | +* `{{location}}/{{instance}}/{{rule}}/{{retrohunt}}` |
| 168 | + |
| 169 | + |
| 170 | +In Terraform v1.5.0 and later, use an [`import` block](https://developer.hashicorp.com/terraform/language/import) to import Retrohunt using one of the formats above. For example: |
| 171 | + |
| 172 | +```tf |
| 173 | +import { |
| 174 | + id = "projects/{{project}}/locations/{{location}}/instances/{{instance}}/rules/{{rule}}/retrohunts/{{retrohunt}}" |
| 175 | + to = google_chronicle_retrohunt.default |
| 176 | +} |
| 177 | +``` |
| 178 | + |
| 179 | +When using the [`terraform import` command](https://developer.hashicorp.com/terraform/cli/commands/import), Retrohunt can be imported using one of the formats above. For example: |
| 180 | + |
| 181 | +``` |
| 182 | +$ terraform import google_chronicle_retrohunt.default projects/{{project}}/locations/{{location}}/instances/{{instance}}/rules/{{rule}}/retrohunts/{{retrohunt}} |
| 183 | +$ terraform import google_chronicle_retrohunt.default {{project}}/{{location}}/{{instance}}/{{rule}}/{{retrohunt}} |
| 184 | +$ terraform import google_chronicle_retrohunt.default {{location}}/{{instance}}/{{rule}}/{{retrohunt}} |
| 185 | +``` |
| 186 | + |
| 187 | +## User Project Overrides |
| 188 | + |
| 189 | +This resource supports [User Project Overrides](https://registry.terraform.io/providers/hashicorp/google/latest/docs/guides/provider_reference#user_project_override). |
0 commit comments