Skip to content

Commit bf587f0

Browse files
committed
Merge remote-tracking branch 'origin/main' into 667-fleet-data-tags
* origin/main: (39 commits) chore(deps): update golang:1.23.1 docker digest to 4f063a2 (#804) fix(deps): update module github.com/go-resty/resty/v2 to v2.15.3 (#781) fix for http/tcp monitor produces inconsistent result after apply (#801) chore(deps): update docker.elastic.co/elasticsearch/elasticsearch docker tag to v8.15.2 (#798) chore(deps): update docker.elastic.co/kibana/kibana docker tag to v8.15.2 (#799) Bump github.com/oapi-codegen/oapi-codegen/v2 in /tools (#808) Bump github.com/oapi-codegen/oapi-codegen/v2 from 2.4.0 to 2.4.1 (#806) Bump actions/checkout from 4.1.7 to 4.2.0 (#807) more fleet framework migrations (#785) Apply the sys_monitoring attribute during creation (#792) fix(deps): update module github.com/oapi-codegen/oapi-codegen/v2 to v2.4.0 (#788) fix(docs): indices datesource example field (#786) fix(deps): update module github.com/hashicorp/terraform-plugin-framework to v1.12.0 (#782) chore(deps): pin golang docker tag to 2fe82a3 (#783) Remove GO_VERSION indirection Fix release pipeline Prepare release v0.11.7 fix(deps): update module github.com/goreleaser/goreleaser/v2 to v2.3.2 (#776) impl framework data_source.fleet_enrollment_tokens (#778) Add support for the `alerts_filter` param in the Create Rule API (#774) ...
2 parents c5418b2 + d73af6a commit bf587f0

File tree

134 files changed

+8858
-3085
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

134 files changed

+8858
-3085
lines changed

.buildkite/hooks/pre-command

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,6 @@
22

33
set -euo pipefail
44

5-
echo "--- Golang version:"
6-
export GO_VERSION=1.22
7-
echo "${GO_VERSION}"
8-
95
RELEASE_VAULT_PATH=kv/ci-shared/terraform-providers
106

117
if [[ "$BUILDKITE_PIPELINE_SLUG" == "terraform-provider-elasticstack-release" ]]; then

.buildkite/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
steps:
22
- label: Release
33
agents:
4-
image: "golang:latest@sha256:613a108a4a4b1dfb6923305db791a19d088f77632317cfc3446825c54fb862cd":${GO_VERSION}
4+
image: "golang:1.23.1@sha256:4f063a24d429510e512cc730c3330292ff49f3ade3ae79bda8f84a24fa25ecb0"
55
cpu: "8"
66
memory: "8G"
77
command:

.github/workflows/test.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
runs-on: ubuntu-latest
1919
timeout-minutes: 5
2020
steps:
21-
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
21+
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4
2222
- uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5
2323
with:
2424
go-version-file: 'go.mod'
@@ -34,7 +34,7 @@ jobs:
3434
name: Lint
3535
runs-on: ubuntu-latest
3636
steps:
37-
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
37+
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4
3838
- uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5
3939
with:
4040
go-version-file: 'tools/go.mod'
@@ -108,7 +108,7 @@ jobs:
108108
- '8.14.3'
109109
- '8.15.0'
110110
steps:
111-
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
111+
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4
112112
- uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5
113113
with:
114114
go-version-file: 'go.mod'

CHANGELOG.md

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,24 @@
11
## [Unreleased]
22

3+
- Fix handling of `sys_monitoring` in `elasticstack_fleet_agent_policy` ([#792](https://github.com/elastic/terraform-provider-elasticstack/pull/792))
4+
- Migrate `elasticstack_fleet_agent_policy`, `elasticstack_fleet_integration` (both), and `elasticstack_fleet_server_host` to terraform-plugin-framework ([#785](https://github.com/elastic/terraform-provider-elasticstack/pull/785))
5+
- Fix for synthetics http/tcp monitor produces inconsistent result after apply ([#801](https://github.com/elastic/terraform-provider-elasticstack/pull/801))
6+
7+
## [0.11.7] - 2024-09-20
8+
9+
- Add the `alerts_filter` field to the `actions` in the Create Rule API ([#774](https://github.com/elastic/terraform-provider-elasticstack/pull/774))
310
- Add the `alert_delay` field to the Create Rule API ([#715](https://github.com/elastic/terraform-provider-elasticstack/pull/715))
411
- Add support for data_stream `lifecycle` template settings ([#724](https://github.com/elastic/terraform-provider-elasticstack/pull/724))
512
- Fix a provider panic when `elasticstack_kibana_action_connector` reads a non-existant connector ([#729](https://github.com/elastic/terraform-provider-elasticstack/pull/729))
613
- Add support for `remote_indicies` to `elasticstack_elasticsearch_security_role` & `elasticstack_kibana_security_role` (#723)[https://github.com/elastic/terraform-provider-elasticstack/pull/723]
714
- Added support for global data tags in agent policy creation and update. Upgraded the generated Fleet API to version 8.15.0. (#730)[https://github.com/elastic/terraform-provider-elasticstack/pull/730]
815
- Fix error handling in `elasticstack_kibana_import_saved_objects` ([#738](https://github.com/elastic/terraform-provider-elasticstack/pull/738))
16+
- Remove `space_id` parameter from private locations to fix inconsistent state for `elasticstack_kibana_synthetics_private_location` `space_id` ([#733](https://github.com/elastic/terraform-provider-elasticstack/pull/733))
17+
- Add the `Frequency` field to the Create Rule API ([#753](https://github.com/elastic/terraform-provider-elasticstack/pull/753))
18+
- Prevent a provider panic when the repository referenced in an `elasticstack_elasticsearch_snapshot_repository` does not exist ([#758](https://github.com/elastic/terraform-provider-elasticstack/pull/758))
19+
- Add support for `remote_indicies` to `elasticstack_elasticsearch_security_api_key` (#766)[https://github.com/elastic/terraform-provider-elasticstack/pull/766]
20+
- Add support for `icmp` and `browser` monitor types to `elasticstack_kibana_synthetics_monitor` resource (#772)[https://github.com/elastic/terraform-provider-elasticstack/pull/772]
21+
- Migrate `elasticstack_fleet_enrollment_tokens` to terraform-plugin-framework ([#778](https://github.com/elastic/terraform-provider-elasticstack/pull/778))
922

1023
## [0.11.6] - 2024-08-20
1124

@@ -332,7 +345,8 @@
332345
- Initial set of docs
333346
- CI integration
334347
335-
[Unreleased]: https://github.com/elastic/terraform-provider-elasticstack/compare/v0.11.6...HEAD
348+
[Unreleased]: https://github.com/elastic/terraform-provider-elasticstack/compare/v0.11.7...HEAD
349+
[0.11.6]: https://github.com/elastic/terraform-provider-elasticstack/compare/v0.11.6...v0.11.7
336350
[0.11.6]: https://github.com/elastic/terraform-provider-elasticstack/compare/v0.11.5...v0.11.6
337351
[0.11.5]: https://github.com/elastic/terraform-provider-elasticstack/compare/v0.11.4...v0.11.5
338352
[0.11.4]: https://github.com/elastic/terraform-provider-elasticstack/compare/v0.11.3...v0.11.4

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
SHELL := /bin/bash
33

44

5-
VERSION ?= 0.11.6
5+
VERSION ?= 0.11.7
66

77
NAME = elasticstack
88
BINARY = terraform-provider-${NAME}
Lines changed: 135 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,135 @@
1+
---
2+
subcategory: "Index"
3+
layout: ""
4+
page_title: "Elasticstack: elasticstack_elasticsearch_indices Data Source"
5+
description: |-
6+
Retrieves indices.
7+
---
8+
9+
# Data Source: elasticstack_elasticsearch_indices
10+
11+
Use this data source to retrieve and get information about existing Elasticsearch indices. See, https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-get-index.html
12+
13+
## Example Usage
14+
15+
```terraform
16+
provider "elasticstack" {
17+
elasticsearch {}
18+
kibana {}
19+
}
20+
21+
data "elasticstack_elasticsearch_indices" "security_indices" {
22+
target = ".security-*"
23+
}
24+
```
25+
26+
<!-- schema generated by tfplugindocs -->
27+
## Schema
28+
29+
### Optional
30+
31+
- `target` (String) Comma-separated list of data streams, indices, and aliases used to limit the request. Supports wildcards (*). To target all data streams and indices, omit this attribute or use * or _all.
32+
33+
### Read-Only
34+
35+
- `id` (String) Generated ID for the indices.
36+
- `indices` (Attributes List) The list of indices. (see [below for nested schema](#nestedatt--indices))
37+
38+
<a id="nestedatt--indices"></a>
39+
### Nested Schema for `indices`
40+
41+
Required:
42+
43+
- `name` (String) Name of the index.
44+
45+
Optional:
46+
47+
- `alias` (Attributes Set) Aliases for the index. (see [below for nested schema](#nestedatt--indices--alias))
48+
- `analysis_analyzer` (String) A JSON string describing the analyzers applied to the index.
49+
- `analysis_char_filter` (String) A JSON string describing the char_filters applied to the index.
50+
- `analysis_filter` (String) A JSON string describing the filters applied to the index.
51+
- `analysis_normalizer` (String) A JSON string describing the normalizers applied to the index.
52+
- `analysis_tokenizer` (String) A JSON string describing the tokenizers applied to the index.
53+
- `analyze_max_token_count` (Number) The maximum number of tokens that can be produced using _analyze API.
54+
- `auto_expand_replicas` (String) Set the number of replicas to the node count in the cluster. Set to a dash delimited lower and upper bound (e.g. 0-5) or use all for the upper bound (e.g. 0-all)
55+
- `blocks_metadata` (Boolean) Set to `true` to disable index metadata reads and writes.
56+
- `blocks_read` (Boolean) Set to `true` to disable read operations against the index.
57+
- `blocks_read_only` (Boolean) Set to `true` to make the index and index metadata read only, `false` to allow writes and metadata changes.
58+
- `blocks_read_only_allow_delete` (Boolean) Identical to `index.blocks.read_only` but allows deleting the index to free up resources.
59+
- `blocks_write` (Boolean) Set to `true` to disable data write operations against the index. This setting does not affect metadata.
60+
- `codec` (String) The `default` value compresses stored data with LZ4 compression, but this can be set to `best_compression` which uses DEFLATE for a higher compression ratio. This can be set only on creation.
61+
- `default_pipeline` (String) The default ingest node pipeline for this index. Index requests will fail if the default pipeline is set and the pipeline does not exist.
62+
- `deletion_protection` (Boolean) Whether to allow Terraform to destroy the index. Unless this field is set to false in Terraform state, a terraform destroy or terraform apply command that deletes the instance will fail.
63+
- `final_pipeline` (String) Final ingest pipeline for the index. Indexing requests will fail if the final pipeline is set and the pipeline does not exist. The final pipeline always runs after the request pipeline (if specified) and the default pipeline (if it exists). The special pipeline name _none indicates no ingest pipeline will run.
64+
- `gc_deletes` (String) The length of time that a deleted document's version number remains available for further versioned operations.
65+
- `highlight_max_analyzed_offset` (Number) The maximum number of characters that will be analyzed for a highlight request.
66+
- `include_type_name` (Boolean) If true, a mapping type is expected in the body of mappings. Defaults to false. Supported for Elasticsearch 7.x.
67+
- `indexing_slowlog_level` (String) Set which logging level to use for the search slow log, can be: `warn`, `info`, `debug`, `trace`
68+
- `indexing_slowlog_source` (String) Set the number of characters of the `_source` to include in the slowlog lines, `false` or `0` will skip logging the source entirely and setting it to `true` will log the entire source regardless of size. The original `_source` is reformatted by default to make sure that it fits on a single log line.
69+
- `indexing_slowlog_threshold_index_debug` (String) Set the cutoff for shard level slow search logging of slow searches for indexing queries, in time units, e.g. `2s`
70+
- `indexing_slowlog_threshold_index_info` (String) Set the cutoff for shard level slow search logging of slow searches for indexing queries, in time units, e.g. `5s`
71+
- `indexing_slowlog_threshold_index_trace` (String) Set the cutoff for shard level slow search logging of slow searches for indexing queries, in time units, e.g. `500ms`
72+
- `indexing_slowlog_threshold_index_warn` (String) Set the cutoff for shard level slow search logging of slow searches for indexing queries, in time units, e.g. `10s`
73+
- `load_fixed_bitset_filters_eagerly` (Boolean) Indicates whether cached filters are pre-loaded for nested queries. This can be set only on creation.
74+
- `mapping_coerce` (Boolean) Set index level coercion setting that is applied to all mapping types.
75+
- `mappings` (String) Mapping for fields in the index.
76+
If specified, this mapping can include: field names, [field data types](https://www.elastic.co/guide/en/elasticsearch/reference/current/mapping-types.html), [mapping parameters](https://www.elastic.co/guide/en/elasticsearch/reference/current/mapping-params.html).
77+
**NOTE:**
78+
- Changing datatypes in the existing _mappings_ will force index to be re-created.
79+
- Removing field will be ignored by default same as elasticsearch. You need to recreate the index to remove field completely.
80+
- `master_timeout` (String) Period to wait for a connection to the master node. If no response is received before the timeout expires, the request fails and returns an error. Defaults to `30s`. This value is ignored when running against Serverless projects.
81+
- `max_docvalue_fields_search` (Number) The maximum number of `docvalue_fields` that are allowed in a query.
82+
- `max_inner_result_window` (Number) The maximum value of `from + size` for inner hits definition and top hits aggregations to this index.
83+
- `max_ngram_diff` (Number) The maximum allowed difference between min_gram and max_gram for NGramTokenizer and NGramTokenFilter.
84+
- `max_refresh_listeners` (Number) Maximum number of refresh listeners available on each shard of the index.
85+
- `max_regex_length` (Number) The maximum length of regex that can be used in Regexp Query.
86+
- `max_rescore_window` (Number) The maximum value of `window_size` for `rescore` requests in searches of this index.
87+
- `max_result_window` (Number) The maximum value of `from + size` for searches to this index.
88+
- `max_script_fields` (Number) The maximum number of `script_fields` that are allowed in a query.
89+
- `max_shingle_diff` (Number) The maximum allowed difference between max_shingle_size and min_shingle_size for ShingleTokenFilter.
90+
- `max_terms_count` (Number) The maximum number of terms that can be used in Terms Query.
91+
- `number_of_replicas` (Number) Number of shard replicas.
92+
- `number_of_routing_shards` (Number) Value used with number_of_shards to route documents to a primary shard. This can be set only on creation.
93+
- `number_of_shards` (Number) Number of shards for the index. This can be set only on creation.
94+
- `query_default_field` (Set of String) Wildcard (*) patterns matching one or more fields. Defaults to '*', which matches all fields eligible for term-level queries, excluding metadata fields.
95+
- `refresh_interval` (String) How often to perform a refresh operation, which makes recent changes to the index visible to search. Can be set to `-1` to disable refresh.
96+
- `routing_allocation_enable` (String) Controls shard allocation for this index. It can be set to: `all` , `primaries` , `new_primaries` , `none`.
97+
- `routing_partition_size` (Number) The number of shards a custom routing value can go to. This can be set only on creation.
98+
- `routing_rebalance_enable` (String) Enables shard rebalancing for this index. It can be set to: `all`, `primaries` , `replicas` , `none`.
99+
- `search_idle_after` (String) How long a shard can not receive a search or get request until it’s considered search idle.
100+
- `search_slowlog_level` (String) Set which logging level to use for the search slow log, can be: `warn`, `info`, `debug`, `trace`
101+
- `search_slowlog_threshold_fetch_debug` (String) Set the cutoff for shard level slow search logging of slow searches in the fetch phase, in time units, e.g. `2s`
102+
- `search_slowlog_threshold_fetch_info` (String) Set the cutoff for shard level slow search logging of slow searches in the fetch phase, in time units, e.g. `5s`
103+
- `search_slowlog_threshold_fetch_trace` (String) Set the cutoff for shard level slow search logging of slow searches in the fetch phase, in time units, e.g. `500ms`
104+
- `search_slowlog_threshold_fetch_warn` (String) Set the cutoff for shard level slow search logging of slow searches in the fetch phase, in time units, e.g. `10s`
105+
- `search_slowlog_threshold_query_debug` (String) Set the cutoff for shard level slow search logging of slow searches in the query phase, in time units, e.g. `2s`
106+
- `search_slowlog_threshold_query_info` (String) Set the cutoff for shard level slow search logging of slow searches in the query phase, in time units, e.g. `5s`
107+
- `search_slowlog_threshold_query_trace` (String) Set the cutoff for shard level slow search logging of slow searches in the query phase, in time units, e.g. `500ms`
108+
- `search_slowlog_threshold_query_warn` (String) Set the cutoff for shard level slow search logging of slow searches in the query phase, in time units, e.g. `10s`
109+
- `shard_check_on_startup` (String) Whether or not shards should be checked for corruption before opening. When corruption is detected, it will prevent the shard from being opened. Accepts `false`, `true`, `checksum`.
110+
- `sort_field` (Set of String) The field to sort shards in this index by.
111+
- `sort_order` (List of String) The direction to sort shards in. Accepts `asc`, `desc`.
112+
- `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`.
113+
- `unassigned_node_left_delayed_timeout` (String) Time to delay the allocation of replica shards which become unassigned because a node has left, in time units, e.g. `10s`
114+
- `wait_for_active_shards` (String) The number of shard copies that must be active before proceeding with the operation. Set to `all` or any positive integer up to the total number of shards in the index (number_of_replicas+1). Default: `1`, the primary shard. This value is ignored when running against Serverless projects.
115+
116+
Read-Only:
117+
118+
- `id` (String) Internal identifier of the resource.
119+
- `settings_raw` (String) All raw settings fetched from the cluster.
120+
121+
<a id="nestedatt--indices--alias"></a>
122+
### Nested Schema for `indices.alias`
123+
124+
Required:
125+
126+
- `name` (String) Index alias name.
127+
128+
Optional:
129+
130+
- `filter` (String) Query used to limit documents the alias can access.
131+
- `index_routing` (String) Value used to route indexing operations to a specific shard. If specified, this overwrites the `routing` value for indexing operations.
132+
- `is_hidden` (Boolean) If true, the alias is hidden.
133+
- `is_write_index` (Boolean) If true, the index is the write index for the alias.
134+
- `routing` (String) Value used to route indexing and search operations to a specific shard.
135+
- `search_routing` (String) Value used to route search operations to a specific shard. If specified, this overwrites the routing value for search operations.

docs/data-sources/fleet_enrollment_tokens.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -32,17 +32,17 @@ data "elasticstack_fleet_enrollment_tokens" "test" {
3232
### Read-Only
3333

3434
- `id` (String) The ID of this resource.
35-
- `tokens` (List of Object) A list of enrollment tokens. (see [below for nested schema](#nestedatt--tokens))
35+
- `tokens` (Attributes List) A list of enrollment tokens. (see [below for nested schema](#nestedatt--tokens))
3636

3737
<a id="nestedatt--tokens"></a>
3838
### Nested Schema for `tokens`
3939

4040
Read-Only:
4141

42-
- `active` (Boolean)
43-
- `api_key` (String)
44-
- `api_key_id` (String)
45-
- `created_at` (String)
46-
- `key_id` (String)
47-
- `name` (String)
48-
- `policy_id` (String)
42+
- `active` (Boolean) Indicates if the enrollment token is active.
43+
- `api_key` (String, Sensitive) The API key.
44+
- `api_key_id` (String) The API key identifier.
45+
- `created_at` (String) The time at which the enrollment token was created.
46+
- `key_id` (String) The unique identifier of the enrollment token.
47+
- `name` (String) The name of the enrollment token.
48+
- `policy_id` (String) The identifier of the associated agent policy.

0 commit comments

Comments
 (0)