|
| 1 | +--- |
| 2 | +# generated by https://github.com/hashicorp/terraform-plugin-docs |
| 3 | +page_title: "elasticstack_elasticsearch_transform Resource - terraform-provider-elasticstack" |
| 4 | +subcategory: "" |
| 5 | +description: |- |
| 6 | + Manages Elasticsearch transforms. See: https://www.elastic.co/guide/en/elasticsearch/reference/current/transforms.html |
| 7 | +--- |
| 8 | + |
| 9 | +# elasticstack_elasticsearch_transform (Resource) |
| 10 | + |
| 11 | +Manages Elasticsearch transforms. See: https://www.elastic.co/guide/en/elasticsearch/reference/current/transforms.html |
| 12 | + |
| 13 | +## Example Usage |
| 14 | + |
| 15 | +```terraform |
| 16 | +resource "elasticstack_elasticsearch_transform" "transform_with_pivot" { |
| 17 | + name = "transform-pivot" |
| 18 | + description = "A meaningful description" |
| 19 | +
|
| 20 | + source { |
| 21 | + indices = ["name_or_pattern_for_input_index"] |
| 22 | + } |
| 23 | +
|
| 24 | + destination { |
| 25 | + index = "destination_index_for_transform" |
| 26 | + } |
| 27 | +
|
| 28 | + pivot = jsonencode({ |
| 29 | + "group_by" : { |
| 30 | + "customer_id" : { |
| 31 | + "terms" : { |
| 32 | + "field" : "customer_id", |
| 33 | + "missing_bucket" : true |
| 34 | + } |
| 35 | + } |
| 36 | + }, |
| 37 | + "aggregations" : { |
| 38 | + "max_price" : { |
| 39 | + "max" : { |
| 40 | + "field" : "taxful_total_price" |
| 41 | + } |
| 42 | + } |
| 43 | + } |
| 44 | + }) |
| 45 | +
|
| 46 | + frequency = "5m" |
| 47 | +
|
| 48 | + retention_policy { |
| 49 | + time { |
| 50 | + field = "order_date" |
| 51 | + max_age = "30d" |
| 52 | + } |
| 53 | + } |
| 54 | +
|
| 55 | + sync { |
| 56 | + time { |
| 57 | + field = "order_date" |
| 58 | + delay = "10s" |
| 59 | + } |
| 60 | + } |
| 61 | +
|
| 62 | + defer_validation = false |
| 63 | +} |
| 64 | +``` |
| 65 | + |
| 66 | +<!-- schema generated by tfplugindocs --> |
| 67 | +## Schema |
| 68 | + |
| 69 | +### Required |
| 70 | + |
| 71 | +- `destination` (Block List, Min: 1, Max: 1) The destination for the transform. (see [below for nested schema](#nestedblock--destination)) |
| 72 | +- `name` (String) Name of the transform you wish to create. |
| 73 | +- `source` (Block List, Min: 1, Max: 1) The source of the data for the transform. (see [below for nested schema](#nestedblock--source)) |
| 74 | + |
| 75 | +### Optional |
| 76 | + |
| 77 | +- `defer_validation` (Boolean) When true, deferrable validations are not run upon creation, but rather when the transform is started. This behavior may be desired if the source index does not exist until after the transform is created. |
| 78 | +- `description` (String) Free text description of the transform. |
| 79 | +- `elasticsearch_connection` (Block List, Max: 1, Deprecated) Elasticsearch connection configuration block. This property will be removed in a future provider version. Configure the Elasticsearch connection via the provider configuration instead. (see [below for nested schema](#nestedblock--elasticsearch_connection)) |
| 80 | +- `frequency` (String) The interval between checks for changes in the source indices when the transform is running continuously. Defaults to `1m`. |
| 81 | +- `latest` (String) The latest method transforms the data by finding the latest document for each unique key. JSON definition expected. Either 'pivot' or 'latest' must be present. |
| 82 | +- `metadata` (String) Defines optional transform metadata. |
| 83 | +- `pivot` (String) The pivot method transforms the data by aggregating and grouping it. JSON definition expected. Either 'pivot' or 'latest' must be present. |
| 84 | +- `retention_policy` (Block List, Max: 1) Defines a retention policy for the transform. (see [below for nested schema](#nestedblock--retention_policy)) |
| 85 | +- `settings` (Block List, Max: 1) Defines optional transform settings. (see [below for nested schema](#nestedblock--settings)) |
| 86 | +- `sync` (Block List, Max: 1) Defines the properties transforms require to run continuously. (see [below for nested schema](#nestedblock--sync)) |
| 87 | +- `timeout` (String) Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error. Defaults to `30s`. |
| 88 | + |
| 89 | +### Read-Only |
| 90 | + |
| 91 | +- `id` (String) Internal identifier of the resource |
| 92 | + |
| 93 | +<a id="nestedblock--destination"></a> |
| 94 | +### Nested Schema for `destination` |
| 95 | + |
| 96 | +Required: |
| 97 | + |
| 98 | +- `index` (String) The destination index for the transform. |
| 99 | + |
| 100 | +Optional: |
| 101 | + |
| 102 | +- `pipeline` (String) The unique identifier for an ingest pipeline. |
| 103 | + |
| 104 | + |
| 105 | +<a id="nestedblock--source"></a> |
| 106 | +### Nested Schema for `source` |
| 107 | + |
| 108 | +Required: |
| 109 | + |
| 110 | +- `indices` (List of String) The source indices for the transform. |
| 111 | + |
| 112 | +Optional: |
| 113 | + |
| 114 | +- `query` (String) A query clause that retrieves a subset of data from the source index. |
| 115 | +- `runtime_mappings` (String) Definitions of search-time runtime fields that can be used by the transform. |
| 116 | + |
| 117 | + |
| 118 | +<a id="nestedblock--elasticsearch_connection"></a> |
| 119 | +### Nested Schema for `elasticsearch_connection` |
| 120 | + |
| 121 | +Optional: |
| 122 | + |
| 123 | +- `api_key` (String, Sensitive) API Key to use for authentication to Elasticsearch |
| 124 | +- `ca_data` (String) PEM-encoded custom Certificate Authority certificate |
| 125 | +- `ca_file` (String) Path to a custom Certificate Authority certificate |
| 126 | +- `cert_data` (String) PEM encoded certificate for client auth |
| 127 | +- `cert_file` (String) Path to a file containing the PEM encoded certificate for client auth |
| 128 | +- `endpoints` (List of String, Sensitive) A list of endpoints where the terraform provider will point to, this must include the http(s) schema and port number. |
| 129 | +- `insecure` (Boolean) Disable TLS certificate validation |
| 130 | +- `key_data` (String, Sensitive) PEM encoded private key for client auth |
| 131 | +- `key_file` (String) Path to a file containing the PEM encoded private key for client auth |
| 132 | +- `password` (String, Sensitive) Password to use for API authentication to Elasticsearch. |
| 133 | +- `username` (String) Username to use for API authentication to Elasticsearch. |
| 134 | + |
| 135 | + |
| 136 | +<a id="nestedblock--retention_policy"></a> |
| 137 | +### Nested Schema for `retention_policy` |
| 138 | + |
| 139 | +Required: |
| 140 | + |
| 141 | +- `time` (Block List, Min: 1, Max: 1) Specifies that the transform uses a time field to set the retention policy. (see [below for nested schema](#nestedblock--retention_policy--time)) |
| 142 | + |
| 143 | +<a id="nestedblock--retention_policy--time"></a> |
| 144 | +### Nested Schema for `retention_policy.time` |
| 145 | + |
| 146 | +Required: |
| 147 | + |
| 148 | +- `field` (String) The date field that is used to calculate the age of the document. |
| 149 | +- `max_age` (String) Specifies the maximum age of a document in the destination index. |
| 150 | + |
| 151 | + |
| 152 | + |
| 153 | +<a id="nestedblock--settings"></a> |
| 154 | +### Nested Schema for `settings` |
| 155 | + |
| 156 | +Optional: |
| 157 | + |
| 158 | +- `align_checkpoints` (Boolean) Specifies whether the transform checkpoint ranges should be optimized for performance. Default value is true. |
| 159 | +- `dates_as_epoch_millis` (Boolean) Defines if dates in the output should be written as ISO formatted string (default) or as millis since epoch. |
| 160 | +- `deduce_mappings` (Boolean) Specifies whether the transform should deduce the destination index mappings from the transform config. The default value is true |
| 161 | +- `docs_per_second` (Number) Specifies a limit on the number of input documents per second. Default value is null, which disables throttling. |
| 162 | +- `max_page_search_size` (Number) Defines the initial page size to use for the composite aggregation for each checkpoint. The default value is 500. |
| 163 | +- `num_failure_retries` (Number) Defines the number of retries on a recoverable failure before the transform task is marked as failed. The default value is the cluster-level setting num_transform_failure_retries. |
| 164 | +- `unattended` (Boolean) In unattended mode, the transform retries indefinitely in case of an error which means the transform never fails. Defaults to false. |
| 165 | + |
| 166 | + |
| 167 | +<a id="nestedblock--sync"></a> |
| 168 | +### Nested Schema for `sync` |
| 169 | + |
| 170 | +Required: |
| 171 | + |
| 172 | +- `time` (Block List, Min: 1, Max: 1) Specifies that the transform uses a time field to synchronize the source and destination indices. (see [below for nested schema](#nestedblock--sync--time)) |
| 173 | + |
| 174 | +<a id="nestedblock--sync--time"></a> |
| 175 | +### Nested Schema for `sync.time` |
| 176 | + |
| 177 | +Required: |
| 178 | + |
| 179 | +- `field` (String) The date field that is used to identify new documents in the source. |
| 180 | + |
| 181 | +Optional: |
| 182 | + |
| 183 | +- `delay` (String) The time delay between the current time and the latest input data time. The default value is 60s. |
| 184 | + |
| 185 | + |
0 commit comments