Skip to content

Commit e442afc

Browse files
committed
Merge remote-tracking branch 'origin/main' into connector-framework
* origin/main: Somehow I didn't merge this properly... (#1273) fix(deps): update module github.com/stretchr/testify to v1.11.1 (#1272) Migrate to terraform-plugin-testing (#1256) Migrate Elasticsearch enrich policy resource and data source to Terraform Plugin Framework (#1220) Add support for solution field in elasticsearch_kibana_space resource and data source (#1210) Don't force replacement when changing integration versions (#1255) chore(deps): update golang:1.25.0 docker digest to 5502b0e (#1267) chore(deps): update docker.elastic.co/kibana/kibana docker tag to v9.1.3 (#1263) Bump github.com/ulikunitz/xz from 0.5.12 to 0.5.14 (#1264)
2 parents f4aaa38 + 5f2154e commit e442afc

File tree

125 files changed

+1151
-695
lines changed

Some content is hidden

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

125 files changed

+1151
-695
lines changed

.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:1.25.0@sha256:9e56f0d0f043a68bb8c47c819e47dc29f6e8f5129b8885bed9d43f058f7f3ed6"
4+
image: "golang:1.25.0@sha256:5502b0e56fca23feba76dbc5387ba59c593c02ccc2f0f7355871ea9a0852cebe"
55
cpu: "16"
66
memory: "24G"
77
ephemeralStorage: "20G"

.github/workflows/copilot-setup-steps.yml

Lines changed: 3 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -21,62 +21,6 @@ jobs:
2121
permissions:
2222
# If you want to clone the repository as part of your setup steps, for example to install dependencies, you'll need the `contents: read` permission. If you don't clone the repository in your setup steps, Copilot will do this for you automatically after the steps complete.
2323
contents: read
24-
env:
25-
ELASTICSEARCH_ENDPOINTS: "http://localhost:9200"
26-
ELASTICSEARCH_USERNAME: "elastic"
27-
ELASTICSEARCH_PASSWORD: password
28-
KIBANA_ENDPOINT: "http://localhost:5601"
29-
KIBANA_USERNAME: "elastic"
30-
KIBANA_PASSWORD: password
31-
KIBANA_SYSTEM_USERNAME: kibana_system
32-
KIBANA_SYSTEM_PASSWORD: password
33-
TF_ACC: "1"
34-
services:
35-
elasticsearch:
36-
image: docker.elastic.co/elasticsearch/elasticsearch:9.1.2@sha256:d1a8016cf55be8ffec635ed69f5a9acb0c459db35b46a4549ec5b2847a2f170a
37-
env:
38-
discovery.type: single-node
39-
xpack.security.enabled: true
40-
xpack.security.authc.api_key.enabled: true
41-
xpack.security.authc.token.enabled: true
42-
xpack.watcher.enabled: true
43-
xpack.license.self_generated.type: trial
44-
repositories.url.allowed_urls: https://example.com/*
45-
path.repo: /tmp
46-
ELASTIC_PASSWORD: ${{ env.ELASTICSEARCH_PASSWORD }}
47-
ports:
48-
- 9200:9200
49-
options: --health-cmd="curl http://localhost:9200/_cluster/health" --health-interval=10s --health-timeout=5s --health-retries=10
50-
kibana:
51-
image: docker.elastic.co/kibana/kibana:9.1.2@sha256:dea5d20df42e6833966deceadb10ecdbf85970b704d17b0abfc3b485622c1a08
52-
env:
53-
SERVER_NAME: kibana
54-
ELASTICSEARCH_HOSTS: http://elasticsearch:9200
55-
ELASTICSEARCH_USERNAME: ${{ env.KIBANA_SYSTEM_USERNAME }}
56-
ELASTICSEARCH_PASSWORD: ${{ env.KIBANA_SYSTEM_PASSWORD }}
57-
XPACK_ENCRYPTEDSAVEDOBJECTS_ENCRYPTIONKEY: a7a6311933d3503b89bc2dbc36572c33a6c10925682e591bffcab6911c06786d
58-
# LOGGING_ROOT_LEVEL: debug
59-
ports:
60-
- 5601:5601
61-
options: --health-cmd="curl http://localhost:5601/api/status" --health-interval=10s --health-timeout=5s --health-retries=10
62-
fleet:
63-
image: docker.elastic.co/elastic-agent/elastic-agent:9.1.2@sha256:942aa0ffe94c268aab83881fc8be0ca0af079c395820ce8e7552f0ce97e0a760
64-
env:
65-
SERVER_NAME: fleet
66-
FLEET_ENROLL: "1"
67-
FLEET_URL: https://fleet:8220
68-
FLEET_INSECURE: "true"
69-
FLEET_SERVER_ENABLE: "1"
70-
FLEET_SERVER_POLICY_ID: fleet-server
71-
FLEET_SERVER_ELASTICSEARCH_HOST: http://elasticsearch:9200
72-
FLEET_SERVER_ELASTICSEARCH_INSECURE: "true"
73-
FLEET_SERVER_INSECURE_HTTP: "true"
74-
KIBANA_HOST: http://kibana:5601
75-
KIBANA_FLEET_SETUP: "1"
76-
KIBANA_FLEET_PASSWORD: ${{ env.ELASTICSEARCH_PASSWORD }}
77-
ports:
78-
- 8220:8220
79-
options: --restart="unless-stopped"
8024

8125
steps:
8226
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5
@@ -88,6 +32,9 @@ jobs:
8832
with:
8933
terraform_wrapper: false
9034

35+
- name: Setup Elastic Stack
36+
run: make docker-fleet
37+
9138
- name: Get dependencies
9239
run: make setup
9340

.github/workflows/test.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,7 @@ jobs:
126126
- '8.15.5'
127127
- '8.16.2'
128128
- '8.17.0'
129+
- '8.18.3'
129130
- '9.0.3'
130131
steps:
131132
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
11
## [Unreleased]
22

3+
- Add support for `solution` field in `elasticstack_kibana_space` resource and data source ([#1102](https://github.com/elastic/terraform-provider-elasticstack/issues/1102))
34
- Add `slo_id` validation to `elasticstack_kibana_slo` ([#1221](https://github.com/elastic/terraform-provider-elasticstack/pull/1221))
45
- Add `ignore_missing_component_templates` to `elasticstack_elasticsearch_index_template` ([#1206](https://github.com/elastic/terraform-provider-elasticstack/pull/1206))
6+
- Migrate `elasticstack_elasticsearch_enrich_policy` resource and data source to Terraform Plugin Framework ([#1220](https://github.com/elastic/terraform-provider-elasticstack/pull/1220))
57
- Prevent provider panic when a script exists in state, but not in Elasticsearch ([#1218](https://github.com/elastic/terraform-provider-elasticstack/pull/1218))
8+
- Allow version changes without a destroy/create cycle with `elasticstack_fleet_integration` ([#1255](https://github.com/elastic/terraform-provider-elasticstack/pull/1255)). This fixes an issue where it was impossible to upgrade integrations which are used by an integration policy.
69
- Add `namespace` attribute to `elasticstack_kibana_synthetics_monitor` resource to support setting data stream namespace independently from `space_id` ([#1247](https://github.com/elastic/terraform-provider-elasticstack/pull/1247))
710
- Support setting an explit `connector_id` in `elasticstack_kibana_action_connector`. This attribute already existed, but was being ignored by the provider. Setting the attribute will return an error in Elastic Stack v8.8 and lower since creating a connector with an explicit ID is not supported. ([1260](https://github.com/elastic/terraform-provider-elasticstack/pull/1260))
811
- Migrate `elasticstack_kibana_action_connector` to the Terraform plugin framework ([#1269](https://github.com/elastic/terraform-provider-elasticstack/pull/1269))

docs/data-sources/elasticsearch_enrich_policy.md

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,11 +74,35 @@ output "query" {
7474

7575
- `name` (String) The name of the policy.
7676

77+
### Optional
78+
79+
- `elasticsearch_connection` (Block List, Deprecated) Elasticsearch connection configuration block. (see [below for nested schema](#nestedblock--elasticsearch_connection))
80+
7781
### Read-Only
7882

7983
- `enrich_fields` (Set of String) Fields to add to matching incoming documents. These fields must be present in the source indices.
8084
- `id` (String) Internal identifier of the resource
8185
- `indices` (Set of String) Array of one or more source indices used to create the enrich index.
82-
- `match_field` (String) Field in source indices used to match incoming documents.
86+
- `match_field` (String) Field from the source indices used to match incoming documents.
8387
- `policy_type` (String) The type of enrich policy, can be one of geo_match, match, range.
8488
- `query` (String) Query used to filter documents in the enrich index. The policy only uses documents matching this query to enrich incoming documents. Defaults to a match_all query.
89+
90+
<a id="nestedblock--elasticsearch_connection"></a>
91+
### Nested Schema for `elasticsearch_connection`
92+
93+
Optional:
94+
95+
- `api_key` (String, Sensitive) API Key to use for authentication to Elasticsearch
96+
- `bearer_token` (String, Sensitive) Bearer Token to use for authentication to Elasticsearch
97+
- `ca_data` (String) PEM-encoded custom Certificate Authority certificate
98+
- `ca_file` (String) Path to a custom Certificate Authority certificate
99+
- `cert_data` (String) PEM encoded certificate for client auth
100+
- `cert_file` (String) Path to a file containing the PEM encoded certificate for client auth
101+
- `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.
102+
- `es_client_authentication` (String, Sensitive) ES Client Authentication field to be used with the JWT token
103+
- `headers` (Map of String, Sensitive) A list of headers to be sent with each request to Elasticsearch.
104+
- `insecure` (Boolean) Disable TLS certificate validation
105+
- `key_data` (String, Sensitive) PEM encoded private key for client auth
106+
- `key_file` (String) Path to a file containing the PEM encoded private key for client auth
107+
- `password` (String, Sensitive) Password to use for API authentication to Elasticsearch.
108+
- `username` (String) Username to use for API authentication to Elasticsearch.

docs/data-sources/kibana_spaces.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,12 @@ Required:
4141
Optional:
4242

4343
- `description` (String) The description for the space.
44-
- `disabled_features` (List of String) The list of disabled features for the space. To get a list of available feature IDs, use the Features API (https://www.elastic.co/guide/en/kibana/master/features-api-get.html).
4544
- `image_url` (String) The data-URL encoded image to display in the space avatar.
4645

4746
Read-Only:
4847

4948
- `color` (String) The hexadecimal color code used in the space avatar. By default, the color is automatically generated from the space name.
49+
- `disabled_features` (List of String) The list of disabled features for the space. To get a list of available feature IDs, use the Features API (https://www.elastic.co/guide/en/kibana/master/features-api-get.html).
5050
- `id` (String) Internal identifier of the resource.
5151
- `initials` (String) The initials shown in the space avatar. By default, the initials are automatically generated from the space name. Initials must be 1 or 2 characters.
52+
- `solution` (String) The solution view for the space. Valid options are `security`, `oblt`, `es`, or `classic`.

docs/resources/elasticsearch_enrich_policy.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,13 +58,13 @@ resource "elasticstack_elasticsearch_enrich_policy" "policy1" {
5858

5959
### Optional
6060

61-
- `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))
61+
- `elasticsearch_connection` (Block List, Deprecated) Elasticsearch connection configuration block. (see [below for nested schema](#nestedblock--elasticsearch_connection))
6262
- `execute` (Boolean) Whether to call the execute API function in order to create the enrich index.
6363
- `query` (String) Query used to filter documents in the enrich index. The policy only uses documents matching this query to enrich incoming documents. Defaults to a match_all query.
6464

6565
### Read-Only
6666

67-
- `id` (String) The ID of this resource.
67+
- `id` (String) Internal identifier of the resource
6868

6969
<a id="nestedblock--elasticsearch_connection"></a>
7070
### Nested Schema for `elasticsearch_connection`

docs/resources/kibana_space.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ resource "elasticstack_kibana_space" "example" {
4141
- `disabled_features` (Set of String) The list of disabled features for the space. To get a list of available feature IDs, use the Features API (https://www.elastic.co/guide/en/kibana/master/features-api-get.html).
4242
- `image_url` (String) The data-URL encoded image to display in the space avatar.
4343
- `initials` (String) The initials shown in the space avatar. By default, the initials are automatically generated from the space name. Initials must be 1 or 2 characters.
44+
- `solution` (String) The solution view for the space. Valid options are `security`, `oblt`, `es`, or `classic`.
4445

4546
### Read-Only
4647

go.mod

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@ require (
1919
github.com/hashicorp/terraform-plugin-log v0.9.0
2020
github.com/hashicorp/terraform-plugin-mux v0.20.0
2121
github.com/hashicorp/terraform-plugin-sdk/v2 v2.37.0
22+
github.com/hashicorp/terraform-plugin-testing v1.13.3
2223
github.com/mitchellh/mapstructure v1.5.1-0.20231216201459-8508981c8b6c
23-
github.com/oapi-codegen/oapi-codegen/v2 v2.5.0
2424
github.com/oapi-codegen/runtime v1.1.2
25-
github.com/stretchr/testify v1.11.0
25+
github.com/stretchr/testify v1.11.1
2626
go.uber.org/mock v0.6.0
2727
)
2828

@@ -287,6 +287,7 @@ require (
287287
github.com/multiformats/go-multibase v0.2.0 // indirect
288288
github.com/multiformats/go-multihash v0.2.3 // indirect
289289
github.com/multiformats/go-varint v0.0.7 // indirect
290+
github.com/oapi-codegen/oapi-codegen/v2 v2.5.0 // indirect
290291
github.com/oasdiff/yaml v0.0.0-20250309154309-f31be36b4037 // indirect
291292
github.com/oasdiff/yaml3 v0.0.0-20250309153720-d2182401db90 // indirect
292293
github.com/oklog/run v1.1.0 // indirect
@@ -339,7 +340,7 @@ require (
339340
github.com/titanous/rocacheck v0.0.0-20171023193734-afe73141d399 // indirect
340341
github.com/tomnomnom/linkheader v0.0.0-20180905144013-02ca5825eb80 // indirect
341342
github.com/transparency-dev/merkle v0.0.2 // indirect
342-
github.com/ulikunitz/xz v0.5.12 // indirect
343+
github.com/ulikunitz/xz v0.5.14 // indirect
343344
github.com/vbatts/tar-split v0.12.1 // indirect
344345
github.com/vmihailenco/msgpack v4.0.4+incompatible // indirect
345346
github.com/vmihailenco/msgpack/v5 v5.4.1 // indirect

go.sum

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -621,6 +621,8 @@ github.com/hashicorp/terraform-plugin-mux v0.20.0 h1:3QpBnI9uCuL0Yy2Rq/kR9cOdmOF
621621
github.com/hashicorp/terraform-plugin-mux v0.20.0/go.mod h1:wSIZwJjSYk86NOTX3fKUlThMT4EAV1XpBHz9SAvjQr4=
622622
github.com/hashicorp/terraform-plugin-sdk/v2 v2.37.0 h1:NFPMacTrY/IdcIcnUB+7hsore1ZaRWU9cnB6jFoBnIM=
623623
github.com/hashicorp/terraform-plugin-sdk/v2 v2.37.0/go.mod h1:QYmYnLfsosrxjCnGY1p9c7Zj6n9thnEE+7RObeYs3fA=
624+
github.com/hashicorp/terraform-plugin-testing v1.13.3 h1:QLi/khB8Z0a5L54AfPrHukFpnwsGL8cwwswj4RZduCo=
625+
github.com/hashicorp/terraform-plugin-testing v1.13.3/go.mod h1:WHQ9FDdiLoneey2/QHpGM/6SAYf4A7AZazVg7230pLE=
624626
github.com/hashicorp/terraform-registry-address v0.2.5 h1:2GTftHqmUhVOeuu9CW3kwDkRe4pcBDq0uuK5VJngU1M=
625627
github.com/hashicorp/terraform-registry-address v0.2.5/go.mod h1:PpzXWINwB5kuVS5CA7m1+eO2f1jKb5ZDIxrOPfpnGkg=
626628
github.com/hashicorp/terraform-svchost v0.1.1 h1:EZZimZ1GxdqFRinZ1tpJwVxxt49xc/S52uzrw4x0jKQ=
@@ -986,8 +988,8 @@ github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o
986988
github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=
987989
github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo=
988990
github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
989-
github.com/stretchr/testify v1.11.0 h1:ib4sjIrwZKxE5u/Japgo/7SJV3PvgjGiRNAvTVGqQl8=
990-
github.com/stretchr/testify v1.11.0/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U=
991+
github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U=
992+
github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U=
991993
github.com/subosito/gotenv v1.6.0 h1:9NlTDc1FTs4qu0DDq7AEtTPNw6SVm7uBMsUCUjABIf8=
992994
github.com/subosito/gotenv v1.6.0/go.mod h1:Dk4QP5c2W3ibzajGcXpNraDfq2IrhjMIvMSWPKKo0FU=
993995
github.com/theupdateframework/go-tuf v0.7.0 h1:CqbQFrWo1ae3/I0UCblSbczevCCbS31Qvs5LdxRWqRI=
@@ -1008,8 +1010,8 @@ github.com/transparency-dev/merkle v0.0.2 h1:Q9nBoQcZcgPamMkGn7ghV8XiTZ/kRxn1yCG
10081010
github.com/transparency-dev/merkle v0.0.2/go.mod h1:pqSy+OXefQ1EDUVmAJ8MUhHB9TXGuzVAT58PqBoHz1A=
10091011
github.com/ugorji/go/codec v1.2.11 h1:BMaWp1Bb6fHwEtbplGBGJ498wD+LKlNSl25MjdZY4dU=
10101012
github.com/ugorji/go/codec v1.2.11/go.mod h1:UNopzCgEMSXjBc6AOMqYvWC1ktqTAfzJZUZgYf6w6lg=
1011-
github.com/ulikunitz/xz v0.5.12 h1:37Nm15o69RwBkXM0J6A5OlE67RZTfzUxTj8fB3dfcsc=
1012-
github.com/ulikunitz/xz v0.5.12/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14=
1013+
github.com/ulikunitz/xz v0.5.14 h1:uv/0Bq533iFdnMHZdRBTOlaNMdb1+ZxXIlHDZHIHcvg=
1014+
github.com/ulikunitz/xz v0.5.14/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14=
10131015
github.com/urfave/cli v1.22.10/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0=
10141016
github.com/vbatts/tar-split v0.12.1 h1:CqKoORW7BUWBe7UL/iqTVvkTBOF8UvOMKOIZykxnnbo=
10151017
github.com/vbatts/tar-split v0.12.1/go.mod h1:eF6B6i6ftWQcDqEn3/iGFRFRo8cBIMSJVOpnNdfTMFA=

0 commit comments

Comments
 (0)