Skip to content

Commit 64763a3

Browse files
committed
Merge remote-tracking branch 'origin/main' into kibana-dashboards
* origin/main: Fixup changelog Bump release disk size Prepare 0.13.0 release (#1532) Fix null value handling in Kibana connector config causing inconsistent apply state (#1524) Add Security List Data Stream Resource (#1525) chore(deps): update golang:1.25.5 docker digest to 0ece421 (#1531) Fleet agent policy host name format field (#1521) chore(deps): update kibana-openapi-spec digest to 6647f81 (#1528) chore(deps): update kibana-openapi-spec digest to bd3d07c (#1519)
2 parents e6cef25 + 5286a72 commit 64763a3

File tree

79 files changed

+3764
-189
lines changed

Some content is hidden

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

79 files changed

+3764
-189
lines changed

.buildkite/release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
steps:
22
- label: Release
33
agents:
4-
image: "golang:1.25.5@sha256:20b91eda7a9627c127c0225b0d4e8ec927b476fa4130c6760928b849d769c149"
4+
image: "golang:1.25.5@sha256:0ece421d4bb2525b7c0b4cad5791d52be38edf4807582407525ca353a429eccc"
55
cpu: "16"
66
memory: "24G"
7-
ephemeralStorage: "20G"
7+
ephemeralStorage: "40G"
88
command:
99
- ".buildkite/scripts/release.sh"

CHANGELOG.md

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

3+
## [0.13.0] - 2025-12-10
4+
35
### Breaking changes
46

57
#### `elasticstack_elasticsearch_index.alias` block has changed to a set attribute.
@@ -40,6 +42,8 @@ alias = [
4042

4143
### Changes
4244

45+
- Fix `elasticstack_kibana_action_connector` failing with "inconsistent result after apply" when config contains null values ([#1524](https://github.com/elastic/terraform-provider-elasticstack/pull/1524))
46+
- Add `host_name_format` to `elasticstack_fleet_agent_policy` to configure host name format (hostname or FQDN) ([#1312](https://github.com/elastic/terraform-provider-elasticstack/pull/1312))
4347
- Create `elasticstack_kibana_prebuilt_rule` resource ([#1296](https://github.com/elastic/terraform-provider-elasticstack/pull/1296))
4448
- Add `required_versions` to `elasticstack_fleet_agent_policy` ([#1436](https://github.com/elastic/terraform-provider-elasticstack/pull/1436))
4549
- Migrate `elasticstack_elasticsearch_security_role` resource to Terraform Plugin Framework ([#1330](https://github.com/elastic/terraform-provider-elasticstack/pull/1330))
@@ -50,6 +54,12 @@ alias = [
5054
- Add `elasticstack_elasticsearch_alias` resource ([#1343](https://github.com/elastic/terraform-provider-elasticstack/pull/1343))
5155
- Add `mapping_total_fields_limit` to `elasticstack_elasticsearch_index` ([#1494](https://github.com/elastic/terraform-provider-elasticstack/pull/1494))
5256
- Add `elasticstack_kibana_default_data_view` resource ([#1379](https://github.com/elastic/terraform-provider-elasticstack/pull/1379))
57+
- Add support for [Security Exceptions](https://github.com/elastic/terraform-provider-elasticstack/issues/1332)
58+
- Add `elasticstack_kibana_security_exception_item` resource ([#1496](https://github.com/elastic/terraform-provider-elasticstack/pull/1496))
59+
- Add `elasticstack_kibana_security_exception_list` resource ([#1495](https://github.com/elastic/terraform-provider-elasticstack/pull/1495))
60+
- Add `elasticstack_kibana_security_list` resource ([#1489](https://github.com/elastic/terraform-provider-elasticstack/pull/1489))
61+
- Add `elasticstack_kibana_security_list_item` resource ([#1492](https://github.com/elastic/terraform-provider-elasticstack/pull/1492))
62+
- Add `elasticstack_kibana_security_list_data_streams` resource ([#1525](https://github.com/elastic/terraform-provider-elasticstack/pull/1525))
5363

5464
## [0.12.2] - 2025-11-19
5565
- Fix `elasticstack_elasticsearch_snapshot_lifecycle` metadata type conversion causing terraform apply to fail ([#1409](https://github.com/elastic/terraform-provider-elasticstack/issues/1409))
@@ -590,7 +600,8 @@ resource "elasticstack_fleet_output" "output" {
590600
- Initial set of docs
591601
- CI integration
592602
593-
[Unreleased]: https://github.com/elastic/terraform-provider-elasticstack/compare/v0.12.2...HEAD
603+
[Unreleased]: https://github.com/elastic/terraform-provider-elasticstack/compare/v0.13.0...HEAD
604+
[0.13.0]: https://github.com/elastic/terraform-provider-elasticstack/compare/v0.12.2...v0.13.0
594605
[0.12.2]: https://github.com/elastic/terraform-provider-elasticstack/compare/v0.12.1...v0.12.2
595606
[0.12.1]: https://github.com/elastic/terraform-provider-elasticstack/compare/v0.12.0...v0.12.1
596607
[0.12.0]: https://github.com/elastic/terraform-provider-elasticstack/compare/v0.11.18...v0.12.0

Makefile

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
.DEFAULT_GOAL = help
22
SHELL := /bin/bash
33

4-
VERSION ?= 0.12.2
4+
VERSION ?= 0.13.0
55

66
NAME = elasticstack
77
BINARY = terraform-provider-${NAME}
@@ -28,6 +28,8 @@ KIBANA_API_KEY_NAME ?= kibana-api-key
2828
FLEET_NAME ?= terraform-elasticstack-fleet
2929
FLEET_ENDPOINT ?= https://$(FLEET_NAME):8220
3030

31+
RERUN_FAILS ?= 3
32+
3133
export GOBIN = $(shell pwd)/bin
3234

3335

@@ -53,7 +55,7 @@ testacc-vs-docker:
5355

5456
.PHONY: testacc
5557
testacc: ## Run acceptance tests
56-
TF_ACC=1 go tool gotestsum --format testname --rerun-fails=3 --packages="-v ./..." -- -count $(ACCTEST_COUNT) -parallel $(ACCTEST_PARALLELISM) $(TESTARGS) -timeout $(ACCTEST_TIMEOUT)
58+
TF_ACC=1 go tool gotestsum --format testname --rerun-fails=$(RERUN_FAILS) --packages="-v ./..." -- -count $(ACCTEST_COUNT) -parallel $(ACCTEST_PARALLELISM) $(TESTARGS) -timeout $(ACCTEST_TIMEOUT)
5759

5860
.PHONY: test
5961
test: ## Run unit tests

docs/resources/fleet_agent_policy.md

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,14 @@ provider "elasticstack" {
1818
}
1919
2020
resource "elasticstack_fleet_agent_policy" "test_policy" {
21-
name = "Test Policy"
22-
namespace = "default"
23-
description = "Test Agent Policy"
24-
sys_monitoring = true
25-
monitor_logs = true
26-
monitor_metrics = true
27-
space_ids = ["default"]
21+
name = "Test Policy"
22+
namespace = "default"
23+
description = "Test Agent Policy"
24+
sys_monitoring = true
25+
monitor_logs = true
26+
monitor_metrics = true
27+
space_ids = ["default"]
28+
host_name_format = "hostname" # or "fqdn" for fully qualified domain names
2829
2930
global_data_tags = {
3031
first_tag = {
@@ -52,6 +53,7 @@ resource "elasticstack_fleet_agent_policy" "test_policy" {
5253
- `download_source_id` (String) The identifier for the Elastic Agent binary download server.
5354
- `fleet_server_host_id` (String) The identifier for the Fleet server host.
5455
- `global_data_tags` (Attributes Map) User-defined data tags to apply to all inputs. Values can be strings (string_value) or numbers (number_value) but not both. Example -- key1 = {string_value = value1}, key2 = {number_value = 42} (see [below for nested schema](#nestedatt--global_data_tags))
56+
- `host_name_format` (String) Determines the format of the host.name field in events. Can be 'hostname' (short hostname, e.g., 'myhost') or 'fqdn' (fully qualified domain name, e.g., 'myhost.example.com'). Defaults to 'hostname'.
5557
- `inactivity_timeout` (String) The inactivity timeout for the agent policy. If an agent does not report within this time period, it will be considered inactive. Supports duration strings (e.g., '30s', '2m', '1h').
5658
- `monitor_logs` (Boolean) Enable collection of agent logs.
5759
- `monitor_metrics` (Boolean) Enable collection of agent metrics.
Lines changed: 137 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,137 @@
1+
---
2+
# generated by https://github.com/hashicorp/terraform-plugin-docs
3+
page_title: "elasticstack_kibana_security_exception_item Resource - terraform-provider-elasticstack"
4+
subcategory: "Kibana"
5+
description: |-
6+
Manages a Kibana Exception Item. Exception items define the specific query conditions used to prevent rules from generating alerts.
7+
See the Kibana Exceptions API documentation https://www.elastic.co/docs/api/doc/kibana/group/endpoint-security-exceptions-api for more details.
8+
---
9+
10+
# elasticstack_kibana_security_exception_item (Resource)
11+
12+
Manages a Kibana Exception Item. Exception items define the specific query conditions used to prevent rules from generating alerts.
13+
14+
See the [Kibana Exceptions API documentation](https://www.elastic.co/docs/api/doc/kibana/group/endpoint-security-exceptions-api) for more details.
15+
16+
## Example Usage
17+
18+
```terraform
19+
resource "elasticstack_kibana_security_exception_list" "example" {
20+
list_id = "my-exception-list"
21+
name = "My Exception List"
22+
description = "List of exceptions"
23+
type = "detection"
24+
namespace_type = "single"
25+
}
26+
27+
resource "elasticstack_kibana_security_exception_item" "complex_entry" {
28+
list_id = elasticstack_kibana_security_exception_list.example.list_id
29+
item_id = "complex-exception"
30+
name = "Complex Exception with Multiple Entries"
31+
description = "Exception with multiple conditions"
32+
type = "simple"
33+
namespace_type = "single"
34+
35+
# Multiple entries with different operators
36+
entries = [
37+
{
38+
type = "match"
39+
field = "host.name"
40+
operator = "included"
41+
value = "trusted-host"
42+
},
43+
{
44+
type = "match_any"
45+
field = "user.name"
46+
operator = "excluded"
47+
values = ["admin", "root"]
48+
}
49+
]
50+
51+
os_types = ["linux"]
52+
tags = ["complex", "multi-condition"]
53+
}
54+
```
55+
56+
<!-- schema generated by tfplugindocs -->
57+
## Schema
58+
59+
### Required
60+
61+
- `description` (String) Describes the exception item.
62+
- `entries` (Attributes List) The exception item entries. This defines the conditions under which the exception applies. (see [below for nested schema](#nestedatt--entries))
63+
- `list_id` (String) The exception list's identifier that this item belongs to.
64+
- `name` (String) The name of the exception item.
65+
- `type` (String) The type of exception item. Must be `simple`.
66+
67+
### Optional
68+
69+
- `comments` (Attributes List) Array of comments about the exception item. (see [below for nested schema](#nestedatt--comments))
70+
- `expire_time` (String) The exception item's expiration date in RFC3339 format. This field is only available for regular exception items, not endpoint exceptions.
71+
- `item_id` (String) The exception item's human readable string identifier.
72+
- `meta` (String) Placeholder for metadata about the exception item as JSON string.
73+
- `namespace_type` (String) Determines whether the exception item is available in all Kibana spaces or just the space in which it is created. Can be `single` (default) or `agnostic`.
74+
- `os_types` (Set of String) Array of OS types for which the exceptions apply. Valid values: `linux`, `macos`, `windows`.
75+
- `space_id` (String) An identifier for the space. If space_id is not provided, the default space is used.
76+
- `tags` (Set of String) String array containing words and phrases to help categorize exception items.
77+
78+
### Read-Only
79+
80+
- `created_at` (String) The timestamp of when the exception item was created.
81+
- `created_by` (String) The user who created the exception item.
82+
- `id` (String) The unique identifier of the exception item (auto-generated by Kibana).
83+
- `tie_breaker_id` (String) Field used in search to ensure all items are sorted and returned correctly.
84+
- `updated_at` (String) The timestamp of when the exception item was last updated.
85+
- `updated_by` (String) The user who last updated the exception item.
86+
87+
<a id="nestedatt--entries"></a>
88+
### Nested Schema for `entries`
89+
90+
Required:
91+
92+
- `field` (String) The field name. Required for all entry types.
93+
- `type` (String) The type of entry. Valid values: `match`, `match_any`, `list`, `exists`, `nested`, `wildcard`.
94+
95+
Optional:
96+
97+
- `entries` (Attributes List) Nested entries (for `nested` type). Only `match`, `match_any`, and `exists` entry types are allowed as nested entries. (see [below for nested schema](#nestedatt--entries--entries))
98+
- `list` (Attributes) Value list reference (for `list` type). (see [below for nested schema](#nestedatt--entries--list))
99+
- `operator` (String) The operator to use. Valid values: `included`, `excluded`. Note: The operator field is not supported for nested entry types and will be ignored if specified.
100+
- `value` (String) The value to match (for `match` and `wildcard` types).
101+
- `values` (List of String) Array of values to match (for `match_any` type).
102+
103+
<a id="nestedatt--entries--entries"></a>
104+
### Nested Schema for `entries.entries`
105+
106+
Required:
107+
108+
- `field` (String) The field name.
109+
- `operator` (String) The operator to use. Valid values: `included`, `excluded`.
110+
- `type` (String) The type of nested entry. Valid values: `match`, `match_any`, `exists`.
111+
112+
Optional:
113+
114+
- `value` (String) The value to match (for `match` type).
115+
- `values` (List of String) Array of values to match (for `match_any` type).
116+
117+
118+
<a id="nestedatt--entries--list"></a>
119+
### Nested Schema for `entries.list`
120+
121+
Required:
122+
123+
- `id` (String) The value list ID.
124+
- `type` (String) The value list type (e.g., `keyword`, `ip`, `ip_range`).
125+
126+
127+
128+
<a id="nestedatt--comments"></a>
129+
### Nested Schema for `comments`
130+
131+
Required:
132+
133+
- `comment` (String) The comment text.
134+
135+
Read-Only:
136+
137+
- `id` (String) The unique identifier of the comment (auto-generated by Kibana).
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
---
2+
# generated by https://github.com/hashicorp/terraform-plugin-docs
3+
page_title: "elasticstack_kibana_security_exception_list Resource - terraform-provider-elasticstack"
4+
subcategory: "Kibana"
5+
description: |-
6+
Manages a Kibana Exception List. Exception lists are containers for exception items used to prevent security rules from generating alerts.
7+
See the Kibana Exceptions API documentation https://www.elastic.co/docs/api/doc/kibana/group/endpoint-security-exceptions-api for more details.
8+
---
9+
10+
# elasticstack_kibana_security_exception_list (Resource)
11+
12+
Manages a Kibana Exception List. Exception lists are containers for exception items used to prevent security rules from generating alerts.
13+
14+
See the [Kibana Exceptions API documentation](https://www.elastic.co/docs/api/doc/kibana/group/endpoint-security-exceptions-api) for more details.
15+
16+
## Example Usage
17+
18+
```terraform
19+
resource "elasticstack_kibana_security_exception_list" "endpoint" {
20+
list_id = "my-endpoint-exception-list"
21+
name = "My Endpoint Exception List"
22+
description = "List of endpoint exceptions"
23+
type = "endpoint"
24+
namespace_type = "agnostic"
25+
26+
os_types = ["linux", "windows", "macos"]
27+
tags = ["endpoint", "security"]
28+
}
29+
```
30+
31+
<!-- schema generated by tfplugindocs -->
32+
## Schema
33+
34+
### Required
35+
36+
- `description` (String) Describes the exception list.
37+
- `name` (String) The name of the exception list.
38+
- `type` (String) The type of exception list. Can be one of: `detection`, `endpoint`, `endpoint_trusted_apps`, `endpoint_events`, `endpoint_host_isolation_exceptions`, `endpoint_blocklists`.
39+
40+
### Optional
41+
42+
- `list_id` (String) The exception list's human readable string identifier.
43+
- `meta` (String) Placeholder for metadata about the list container as JSON string.
44+
- `namespace_type` (String) Determines whether the exception list is available in all Kibana spaces or just the space in which it is created. Can be `single` (default) or `agnostic`.
45+
- `os_types` (Set of String) Array of OS types for which the exceptions apply. Valid values: `linux`, `macos`, `windows`.
46+
- `space_id` (String) An identifier for the space. If space_id is not provided, the default space is used.
47+
- `tags` (Set of String) String array containing words and phrases to help categorize exception containers.
48+
49+
### Read-Only
50+
51+
- `created_at` (String) The timestamp of when the exception list was created.
52+
- `created_by` (String) The user who created the exception list.
53+
- `id` (String) The unique identifier of the exception list (auto-generated by Kibana).
54+
- `immutable` (Boolean) Whether the exception list is immutable.
55+
- `tie_breaker_id` (String) Field used in search to ensure all containers are sorted and returned correctly.
56+
- `updated_at` (String) The timestamp of when the exception list was last updated.
57+
- `updated_by` (String) The user who last updated the exception list.
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
---
2+
# generated by https://github.com/hashicorp/terraform-plugin-docs
3+
page_title: "elasticstack_kibana_security_list Resource - terraform-provider-elasticstack"
4+
subcategory: "Kibana"
5+
description: |-
6+
Manages Kibana security lists (also known as value lists). Security lists are used by exception items to define sets of values for matching or excluding in security rules.
7+
Relevant Kibana docs can be found here https://www.elastic.co/docs/api/doc/kibana/group/endpoint-security-lists-api.
8+
Notes
9+
Security lists define the type of data they can contain via the type attributeOnce created, the type of a list cannot be changedLists can be referenced by exception items to create more sophisticated matching rulesThe list_id is auto-generated if not provided
10+
---
11+
12+
# elasticstack_kibana_security_list (Resource)
13+
14+
Manages Kibana security lists (also known as value lists). Security lists are used by exception items to define sets of values for matching or excluding in security rules.
15+
16+
Relevant Kibana docs can be found [here](https://www.elastic.co/docs/api/doc/kibana/group/endpoint-security-lists-api).
17+
18+
## Notes
19+
20+
- Security lists define the type of data they can contain via the `type` attribute
21+
- Once created, the `type` of a list cannot be changed
22+
- Lists can be referenced by exception items to create more sophisticated matching rules
23+
- The `list_id` is auto-generated if not provided
24+
25+
## Example Usage
26+
27+
```terraform
28+
resource "elasticstack_kibana_security_list" "ip_list" {
29+
space_id = "default"
30+
name = "Trusted IP Addresses"
31+
description = "List of trusted IP addresses for security rules"
32+
type = "ip"
33+
}
34+
```
35+
36+
<!-- schema generated by tfplugindocs -->
37+
## Schema
38+
39+
### Required
40+
41+
- `description` (String) Describes the security list.
42+
- `name` (String) The name of the security list.
43+
- `type` (String) Specifies the Elasticsearch data type of values the list contains. Valid values include: `binary`, `boolean`, `byte`, `date`, `date_nanos`, `date_range`, `double`, `double_range`, `float`, `float_range`, `geo_point`, `geo_shape`, `half_float`, `integer`, `integer_range`, `ip`, `ip_range`, `keyword`, `long`, `long_range`, `shape`, `short`, `text`.
44+
45+
### Optional
46+
47+
- `deserializer` (String) Determines how retrieved list item values are presented. By default, list items are presented using Handlebars expressions based on the type.
48+
- `id` (String) The unique identifier of the security list (auto-generated by Kibana if not specified).
49+
- `list_id` (String) The value list's human-readable identifier.
50+
- `meta` (String) Placeholder for metadata about the value list as JSON string.
51+
- `serializer` (String) Determines how uploaded list item values are parsed. By default, list items are parsed using named regex groups based on the type.
52+
- `space_id` (String) An identifier for the space. If space_id is not provided, the default space is used.
53+
- `version` (Number) The document version number.
54+
55+
### Read-Only
56+
57+
- `created_at` (String) The timestamp of when the list was created.
58+
- `created_by` (String) The user who created the list.
59+
- `immutable` (Boolean) Whether the list is immutable.
60+
- `tie_breaker_id` (String) Field used in search to ensure all containers are sorted and returned correctly.
61+
- `updated_at` (String) The timestamp of when the list was last updated.
62+
- `updated_by` (String) The user who last updated the list.
63+
- `version_id` (String) The version id, normally returned by the API when the document is retrieved. Use it to ensure updates are done against the latest version.

0 commit comments

Comments
 (0)