Skip to content

Commit 5c70ec5

Browse files
authored
Merge branch 'main' into main
2 parents edac76c + 42678a1 commit 5c70ec5

File tree

35 files changed

+942
-1051
lines changed

35 files changed

+942
-1051
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:1ecc479bc712a6bdb56df3e346e33edcc141f469f82840bab9f4bc2bc41bf91d"
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: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +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))
711
- Update rule ID documentation. ([#1047](https://github.com/elastic/terraform-provider-elasticstack/pull/1047))
8-
- Mark `elasticstack_kibana_action_connector.secrets` as sensitive. ([#1045](https://github.com/elastic/terraform-provider-elasticstack/pull/1045)
12+
- Mark `elasticstack_kibana_action_connector.secrets` as sensitive. ([#1045](https://github.com/elastic/terraform-provider-elasticstack/pull/1045))
913

1014
## [0.11.13] - 2025-01-09
1115

@@ -14,6 +18,7 @@
1418
- Support 8.17.0 in acc tests ([#969](https://github.com/elastic/terraform-provider-elasticstack/pull/969)).
1519
- Support 9.0.0 in acc tests ([#954](https://github.com/elastic/terraform-provider-elasticstack/pull/954)).
1620
- 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)).
1722

1823
## [0.11.12] - 2024-12-16
1924

@@ -413,7 +418,8 @@
413418
- Initial set of docs
414419
- CI integration
415420
416-
[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
417423
[0.11.13]: https://github.com/elastic/terraform-provider-elasticstack/compare/v0.11.12...v0.11.13
418424
[0.11.12]: https://github.com/elastic/terraform-provider-elasticstack/compare/v0.11.11...v0.11.12
419425
[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:

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)