chaossearch_view Resource
The chaossearch_view
resource creates or updates a Refinery view to search the indexed data from one or more object groups. You can use the view for analytics queries, searches, and visualizations.
When creating views and specifying values for fields, it can be helpful to review the information for creating views in the UI as well as for creating views using the ChaosSearch API.
Example Usage
The structure of the resource follows:
resource "chaossearch_view" "view" {
bucket = "tf-provider-view"
case_insensitive = false
index_pattern = ".*"
index_retention = -1
overwrite = true
sources = ["tf-provider"]
time_field_name = "timestamp"
filter {
predicate {
type = "chaossumo.query.NIRFrontend.Request.Predicate.Negate"
pred = {
type = "chaossumo.query.NIRFrontend.Request.Predicate.TextMatch"
field = "STATUS"
query = "*F*"
state {
type = "chaossumo.query.QEP.Predicate.TextMatchState.Exact"
}
}
}
}
transforms = [
jsonencode(
{
"_type": "PartitionKeyTransform"
"keyPart": 0
"inputField": "cs_partition_key_0"
}
),
jsonencode(
{
"_type": "PartitionKeyTransform"
"keyPart": 1
"inputField": "cs_partition_key_1"
}
]
}
Argument Reference
Field | Required | Description | ||||
---|---|---|---|---|---|---|
| Yes | The name of the view to create or update | ||||
| No | Indicates whether the view requires case-sensitive input for fields and values, or whether case-insensitive querying is supported. The default is | ||||
| No | A regex pattern that limits searches to specific daily interval files for the object group(s) associated with the view. The default is to search all associated daily intervals. Specify a pattern to search specific daily intervals such as those for specific numbered days of the month, and so forth. | ||||
| No | A window that specifies a previous number of days of daily intervals that the view can query. A value of 7 allows the view to search only the last 7 days of daily intervals, even if there is more/older indexed data for the object groups in the view. A value of -1 allows the view to query against all associated daily intervals. | ||||
| No | If the view already exists, this is a boolean value to specify whether Terraform can update the existing view ( | ||||
| Yes | A list of one or more object groups (and their indexed data) that the view can search | ||||
| Yes | A timeval data type column within the indexed data of the associated sources to use as a timestamp (such as for a Kibana/OpenSearch histogram) | ||||
| No | A container for one or more filter predicates | ||||
| No | A filter predicate rule container | ||||
| No | A value that indicates the relationship of the specified preds or pred values to each other, or how to use the query value for the analysis. Valid values are:
"And" and "Or" types are primarily used when there are multiple preds specified.
| ||||
| No | A container for only one filter preciate | ||||
| No | A container for several filter predicates Takes in an array of JSON fields and settings. Follows the same structure as | ||||
| No | One of the predicate | ||||
| No | The name of a column (which usually has a one-to-one map to fields in a view) in the indexed data to query; could be a virtually transformed field from the view definition | ||||
| No | A value for the filter query | ||||
| A container for a filtering instruction | |||||
| No | A more-refined filtering instruction for the specific field, like one of the | ||||
| No | An array of transformations that can be applied to columns in the indexed data to create virtual transformations (virtual columns) that can be displayed by the view. | ||||
| No | A container of one or more arrays of JSON instructions to transform an input column with the specified transformation type and pattern | ||||
| No | A type of transformation:
| ||||
| No | The column name on which to apply the specified transform type | ||||
| No | For | ||||
` |
| No | For a | |||
| No | For a | ||||
| No | For a | ||||
| No | For a | ||||
| No | For a
|
Updated 14 days ago