Skip to content

Commit fcec64a

Browse files
committed
Merge remote-tracking branch 'upstream/main' into mw-resource
2 parents 2113704 + 3163d93 commit fcec64a

File tree

39 files changed

+947
-1053
lines changed

39 files changed

+947
-1053
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.24.0@sha256:2b1cbf278ce05a2a310a3d695ebb176420117a8cfcfcc4e5e68a1bef5f6354da"
4+
image: "golang:1.24.2@sha256:d9db32125db0c3a680cfb7a1afcaefb89c898a075ec148fdc2f0f646cc2ed509"
55
cpu: "16"
66
memory: "24G"
77
ephemeralStorage: "20G"

.github/workflows/test.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
timeout-minutes: 5
2020
steps:
2121
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
22-
- uses: actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34 # v5
22+
- uses: actions/setup-go@0aaccfd150d50ccaeb58ebd88d36e91967a5f35b # v5
2323
with:
2424
go-version-file: 'go.mod'
2525
cache: true
@@ -35,7 +35,7 @@ jobs:
3535
runs-on: ubuntu-latest
3636
steps:
3737
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
38-
- uses: actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34 # v5
38+
- uses: actions/setup-go@0aaccfd150d50ccaeb58ebd88d36e91967a5f35b # v5
3939
with:
4040
go-version-file: 'tools/go.mod'
4141
cache: true
@@ -129,7 +129,7 @@ jobs:
129129
- '9.0.0-SNAPSHOT'
130130
steps:
131131
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
132-
- uses: actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34 # v5
132+
- uses: actions/setup-go@0aaccfd150d50ccaeb58ebd88d36e91967a5f35b # v5
133133
with:
134134
go-version-file: 'go.mod'
135135
cache: true

.golangci.yaml

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,20 @@
1-
# increase the default timeout for slow CI needs
2-
run:
3-
timeout: 300s
4-
concurrency: 0
1+
version: "2"
2+
linters:
3+
exclusions:
4+
generated: lax
5+
presets:
6+
- comments
7+
- common-false-positives
8+
- legacy
9+
- std-error-handling
10+
paths:
11+
- third_party$
12+
- builtin$
13+
- examples$
14+
formatters:
15+
exclusions:
16+
generated: lax
17+
paths:
18+
- third_party$
19+
- builtin$
20+
- examples$

CHANGELOG.md

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

3+
- Add `global_data_tags` to fleet agent policies. ([#1044](https://github.com/elastic/terraform-provider-elasticstack/pull/1044))
4+
5+
## [0.11.14] - 2025-03-17
6+
37
- Fix a provider crash when interacting with elasticstack_kibana_data_view resources created with 0.11.0. ([#979](https://github.com/elastic/terraform-provider-elasticstack/pull/979))
48
- Add `max_primary_shard_docs` condition to ILM rollover ([#845](https://github.com/elastic/terraform-provider-elasticstack/pull/845))
59
- Add missing entries to `data_view.field_formats.params` ([#1001](https://github.com/elastic/terraform-provider-elasticstack/pull/1001))
610
- Fix namespaces inconsistency when creating elasticstack_kibana_data_view resources ([#1011](https://github.com/elastic/terraform-provider-elasticstack/pull/1011))
11+
- Update rule ID documentation. ([#1047](https://github.com/elastic/terraform-provider-elasticstack/pull/1047))
12+
- Mark `elasticstack_kibana_action_connector.secrets` as sensitive. ([#1045](https://github.com/elastic/terraform-provider-elasticstack/pull/1045))
713

814
## [0.11.13] - 2025-01-09
915

@@ -12,6 +18,7 @@
1218
- Support 8.17.0 in acc tests ([#969](https://github.com/elastic/terraform-provider-elasticstack/pull/969)).
1319
- Support 9.0.0 in acc tests ([#954](https://github.com/elastic/terraform-provider-elasticstack/pull/954)).
1420
- Support several ssl fields in `elasticstack_kibana_synthetics_monitor` ([#967](https://github.com/elastic/terraform-provider-elasticstack/pull/967)).
21+
- HTTP 400 Bad Request When Creating elasticstack_kibana_security_role ([933](https://github.com/elastic/terraform-provider-elasticstack/issues/933)).
1522

1623
## [0.11.12] - 2024-12-16
1724

@@ -411,7 +418,8 @@
411418
- Initial set of docs
412419
- CI integration
413420
414-
[Unreleased]: https://github.com/elastic/terraform-provider-elasticstack/compare/v0.11.13...HEAD
421+
[Unreleased]: https://github.com/elastic/terraform-provider-elasticstack/compare/v0.11.14...HEAD
422+
[0.11.14]: https://github.com/elastic/terraform-provider-elasticstack/compare/v0.11.13...v0.11.14
415423
[0.11.13]: https://github.com/elastic/terraform-provider-elasticstack/compare/v0.11.12...v0.11.13
416424
[0.11.12]: https://github.com/elastic/terraform-provider-elasticstack/compare/v0.11.11...v0.11.12
417425
[0.11.11]: https://github.com/elastic/terraform-provider-elasticstack/compare/v0.11.10...v0.11.11

CONTRIBUTING.md

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,4 +47,17 @@ Create a PR and check acceptance test matrix is green.
4747

4848
## Run provider with local terraform
4949

50-
TBD
50+
TBD
51+
52+
## Releasing
53+
54+
Releasing is implemented in CI pipeline.
55+
56+
To release a new provider version:
57+
58+
* Create PR which
59+
- updates Makefile with the new provider VERSION (e.g. `VERSION ?= 0.11.13`);
60+
- updates CHANGELOG.md with the list of changes being released.
61+
[Example](https://github.com/elastic/terraform-provider-elasticstack/commit/be866ebc918184e843dc1dd2f6e2e1b963da386d).
62+
63+
* Once the PR merged, the release CI pipeline can be started by pushing a new release tag to `main` branch.

Makefile

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

4-
5-
VERSION ?= 0.11.13
4+
VERSION ?= 0.11.14
65

76
NAME = elasticstack
87
BINARY = terraform-provider-${NAME}
@@ -246,14 +245,18 @@ install: build ## Install built provider into the local terraform cache
246245

247246

248247
.PHONY: tools
249-
tools: $(GOBIN) ## Install useful tools for linting, docs generation and development
248+
tools: $(GOBIN) tools-golangci-lint ## Install useful tools for linting, docs generation and development
250249
@ cd tools && go install github.com/client9/misspell/cmd/misspell
251250
@ cd tools && go install github.com/hashicorp/terraform-plugin-docs/cmd/tfplugindocs
252-
@ cd tools && go install github.com/golangci/golangci-lint/cmd/golangci-lint
253251
@ cd tools && go install github.com/goreleaser/goreleaser/v2
254252
@ cd tools && go install github.com/oapi-codegen/oapi-codegen/v2/cmd/oapi-codegen
255253
@ cd tools && go install go.uber.org/mock/mockgen
256254

255+
.PHONY: tools-golangci-lint
256+
tools-golangci-lint: ## Download golangci-lint locally if necessary.
257+
@[[ -f $(GOBIN)/golangci-lint ]] || curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(GOBIN) v2.0.2
258+
259+
257260
.PHONY: misspell
258261
misspell:
259262
@ $(GOBIN)/misspell -error -source go ./internal/

docs/resources/fleet_agent_policy.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,15 @@ resource "elasticstack_fleet_agent_policy" "test_policy" {
2424
sys_monitoring = true
2525
monitor_logs = true
2626
monitor_metrics = true
27+
28+
global_data_tags = {
29+
first_tag = {
30+
string_value = "tag_value"
31+
},
32+
second_tag = {
33+
number_value = 1.2
34+
}
35+
}
2736
}
2837
```
2938

@@ -41,6 +50,7 @@ resource "elasticstack_fleet_agent_policy" "test_policy" {
4150
- `description` (String) The description of the agent policy.
4251
- `download_source_id` (String) The identifier for the Elastic Agent binary download server.
4352
- `fleet_server_host_id` (String) The identifier for the Fleet server host.
53+
- `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))
4454
- `monitor_logs` (Boolean) Enable collection of agent logs.
4555
- `monitor_metrics` (Boolean) Enable collection of agent metrics.
4656
- `monitoring_output_id` (String) The identifier for monitoring output.
@@ -52,6 +62,14 @@ resource "elasticstack_fleet_agent_policy" "test_policy" {
5262

5363
- `id` (String) The ID of this resource.
5464

65+
<a id="nestedatt--global_data_tags"></a>
66+
### Nested Schema for `global_data_tags`
67+
68+
Optional:
69+
70+
- `number_value` (Number) Number value for the field. If this is set, string_value must not be defined.
71+
- `string_value` (String) String value for the field. If this is set, number_value must not be defined.
72+
5573
## Import
5674

5775
Import is supported using the following syntax:

docs/resources/kibana_action_connector.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ resource "elasticstack_kibana_action_connector" "slack-api-connector" {
6666

6767
- `config` (String) The configuration for the connector. Configuration properties vary depending on the connector type.
6868
- `connector_id` (String) A UUID v1 or v4 to use instead of a randomly generated ID.
69-
- `secrets` (String) The secrets configuration for the connector. Secrets configuration properties vary depending on the connector type.
69+
- `secrets` (String, Sensitive) The secrets configuration for the connector. Secrets configuration properties vary depending on the connector type.
7070
- `space_id` (String) An identifier for the space. If space_id is not provided, the default space is used.
7171

7272
### Read-Only

docs/resources/kibana_alerting_rule.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ Could not create API key - Unsupported scheme "ApiKey" for granting API Key
6464
- `alert_delay` (Number) A number that indicates how many consecutive runs need to meet the rule conditions for an alert to occur.
6565
- `enabled` (Boolean) Indicates if you want to run the rule on an interval basis.
6666
- `notify_when` (String) Required until v8.6.0. Deprecated in v8.13.0. Use the `notify_when` property in the action `frequency` object instead. Defines how often alerts generate actions. Valid values include: `onActionGroupChange`: Actions run when the alert status changes; `onActiveAlert`: Actions run when the alert becomes active and at each check interval while the rule conditions are met; `onThrottleInterval`: Actions run when the alert becomes active and at the interval specified in the throttle property while the rule conditions are met. NOTE: This is a rule level property; if you update the rule in Kibana, it is automatically changed to use action-specific `notify_when` values.
67-
- `rule_id` (String) A UUID v1 or v4 to use instead of a randomly generated ID.
67+
- `rule_id` (String) The identifier for the rule. Until Kibana version 8.17.0 this should be a UUID v1 or v4, for later versions any format can be used. If it is omitted, an ID is randomly generated.
6868
- `space_id` (String) An identifier for the space. If space_id is not provided, the default space is used.
6969
- `tags` (List of String) A list of tag names that are applied to the rule.
7070
- `throttle` (String) Deprecated in 8.13.0. Defines how often an alert generates repeated actions. This custom action interval must be specified in seconds, minutes, hours, or days. For example, 10m or 1h. This property is applicable only if `notify_when` is `onThrottleInterval`. NOTE: This is a rule level property; if you update the rule in Kibana, it is automatically changed to use action-specific `throttle` values.

examples/resources/elasticstack_fleet_agent_policy/resource.tf

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,13 @@ resource "elasticstack_fleet_agent_policy" "test_policy" {
99
sys_monitoring = true
1010
monitor_logs = true
1111
monitor_metrics = true
12+
13+
global_data_tags = {
14+
first_tag = {
15+
string_value = "tag_value"
16+
},
17+
second_tag = {
18+
number_value = 1.2
19+
}
20+
}
1221
}

0 commit comments

Comments
 (0)