Skip to content

Commit 86cb913

Browse files
committed
Merge remote-tracking branch 'upstream/main' into mw-resource
2 parents e3182c8 + 259f662 commit 86cb913

Some content is hidden

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

70 files changed

+7271
-3082
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.4@sha256:10c131810f80a4802c49cab0961bbe18a16f4bb2fb99ef16deaa23e4246fc817"
4+
image: "golang:1.24.4@sha256:20a022e5112a144aa7b7aeb3f22ebf2cdaefcc4aac0d64e8deeee8cdc18b9c0f"
55
cpu: "16"
66
memory: "24G"
77
ephemeralStorage: "20G"

.github/workflows/test.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,9 @@ jobs:
3737
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
3838
- uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5
3939
with:
40-
go-version-file: 'tools/go.mod'
40+
go-version-file: 'go.mod'
4141
cache: true
42-
cache-dependency-path: tools/go.sum
42+
cache-dependency-path: go.sum
4343
- uses: hashicorp/setup-terraform@b9cd54a3c349d3f38e8881555d616ced269862dd # v3
4444
with:
4545
terraform_wrapper: false
@@ -179,4 +179,5 @@ jobs:
179179
ELASTICSEARCH_USERNAME: "elastic"
180180
ELASTICSEARCH_PASSWORD: ${{ env.ELASTIC_PASSWORD }}
181181
KIBANA_ENDPOINT: "http://localhost:5601"
182-
KIBANA_API_KEY: ${{ steps.get-api-key.outputs.apikey }}
182+
KIBANA_USERNAME: "elastic"
183+
KIBANA_PASSWORD: ${{ env.ELASTIC_PASSWORD }}

.golangci.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
version: "2"
22
linters:
3+
enable:
4+
- misspell
35
exclusions:
46
generated: lax
57
presets:

CHANGELOG.md

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

33
- Add `headers` for the provider connection ([#1057](https://github.com/elastic/terraform-provider-elasticstack/pull/1057))
4+
- Migrate `elasticstack_elasticsearch_system_user` resource to Terraform plugin framework ([#1154](https://github.com/elastic/terraform-provider-elasticstack/pull/1154))
45
- Add custom `endpoint` configuration support for snapshot repository setup ([#1158](https://github.com/elastic/terraform-provider-elasticstack/pull/1158))
6+
- Add `description` to `elasticstack_kibana_security_role` ([#1172](https://github.com/elastic/terraform-provider-elasticstack/issues/1172))
7+
- Add `elasticstack_kibana_synthetics_parameter` resource ([#1155](https://github.com/elastic/terraform-provider-elasticstack/pull/1155))
58

69
## [0.11.15] - 2025-04-23
710

@@ -423,7 +426,8 @@
423426
- Initial set of docs
424427
- CI integration
425428
426-
[Unreleased]: https://github.com/elastic/terraform-provider-elasticstack/compare/v0.11.14...HEAD
429+
[Unreleased]: https://github.com/elastic/terraform-provider-elasticstack/compare/v0.11.15...HEAD
430+
[0.11.15]: https://github.com/elastic/terraform-provider-elasticstack/compare/v0.11.14...v0.11.15
427431
[0.11.14]: https://github.com/elastic/terraform-provider-elasticstack/compare/v0.11.13...v0.11.14
428432
[0.11.13]: https://github.com/elastic/terraform-provider-elasticstack/compare/v0.11.12...v0.11.13
429433
[0.11.12]: https://github.com/elastic/terraform-provider-elasticstack/compare/v0.11.11...v0.11.12

CONTRIBUTING.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22

33
Fork the repo, work on an issue
44

5+
## Updating the generated Kibana client.
6+
7+
If your work involves the Kibana API, the endpoints may or may not be included in the generated client.
8+
Check [generated/kbapi](./generated/kbapi/) for more details.
9+
510
## Acceptance tests
611

712
```bash
@@ -60,4 +65,4 @@ To release a new provider version:
6065
- updates CHANGELOG.md with the list of changes being released.
6166
[Example](https://github.com/elastic/terraform-provider-elasticstack/commit/be866ebc918184e843dc1dd2f6e2e1b963da386d).
6267

63-
* Once the PR merged, the release CI pipeline can be started by pushing a new release tag to `main` branch.
68+
* Once the PR is merged, the release CI pipeline can be started by pushing a new release tag to the `main` branch.

Makefile

Lines changed: 8 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ docker-clean: ## Try to remove provisioned nodes and assigned network
225225

226226
.PHONY: docs-generate
227227
docs-generate: tools ## Generate documentation for the provider
228-
@ $(GOBIN)/tfplugindocs
228+
@ go tool github.com/hashicorp/terraform-plugin-docs/cmd/tfplugindocs
229229

230230

231231
.PHONY: gen
@@ -245,31 +245,16 @@ install: build ## Install built provider into the local terraform cache
245245

246246

247247
.PHONY: tools
248-
tools: $(GOBIN) tools-golangci-lint ## Install useful tools for linting, docs generation and development
249-
@ cd tools && go install github.com/client9/misspell/cmd/misspell
250-
@ cd tools && go install github.com/hashicorp/terraform-plugin-docs/cmd/tfplugindocs
251-
@ cd tools && go install github.com/goreleaser/goreleaser/v2
252-
@ cd tools && go install github.com/oapi-codegen/oapi-codegen/v2/cmd/oapi-codegen
253-
@ cd tools && go install go.uber.org/mock/mockgen
254-
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.1.6
258-
259-
260-
.PHONY: misspell
261-
misspell:
262-
@ $(GOBIN)/misspell -error -source go ./internal/
263-
@ $(GOBIN)/misspell -error -source text ./templates/
264-
248+
tools: $(GOBIN) ## Download golangci-lint locally if necessary.
249+
@[[ -f $(GOBIN)/golangci-lint ]] || curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(GOBIN) v2.2.1
265250

266251
.PHONY: golangci-lint
267252
golangci-lint:
268253
@ $(GOBIN)/golangci-lint run --max-same-issues=0 $(GOLANGCIFLAGS) ./internal/...
269254

270255

271256
.PHONY: lint
272-
lint: setup misspell golangci-lint check-fmt check-docs ## Run lints to check the spelling and common go patterns
257+
lint: setup golangci-lint check-fmt check-docs ## Run lints to check the spelling and common go patterns
273258

274259
.PHONY: fmt
275260
fmt: ## Format code
@@ -290,22 +275,21 @@ check-docs: docs-generate ## Check uncommitted changes on docs
290275

291276

292277
.PHONY: setup
293-
setup: tools ## Setup the dev environment
294-
278+
setup: tools vendor ## Setup the dev environment
295279

296280
.PHONY: release-snapshot
297281
release-snapshot: tools ## Make local-only test release to see if it works using "release" command
298-
@ $(GOBIN)/goreleaser release --snapshot --clean
282+
@ go tool github.com/goreleaser/goreleaser/v2 release --snapshot --clean
299283

300284

301285
.PHONY: release-no-publish
302286
release-no-publish: tools check-sign-release ## Make a release without publishing artifacts
303-
@ $(GOBIN)/goreleaser release --skip=publish,announce,validate --parallelism=2
287+
@ go tool github.com/goreleaser/goreleaser/v2 release --skip=publish,announce,validate --parallelism=2
304288

305289

306290
.PHONY: release
307291
release: tools check-sign-release check-publish-release ## Build, sign, and upload your release
308-
@ $(GOBIN)/goreleaser release --clean --parallelism=4
292+
@ go tool github.com/goreleaser/goreleaser/v2 release --clean --parallelism=4
309293

310294

311295
.PHONY: check-sign-release

docs/data-sources/kibana_security_role.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ data "elasticstack_kibana_security_role" "example" {
3232

3333
### Optional
3434

35+
- `description` (String) Description for the role
3536
- `metadata` (String) Optional meta-data.
3637

3738
### Read-Only

docs/resources/elasticsearch_security_system_user.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,10 @@ resource "elasticstack_elasticsearch_security_system_user" "kibana_system" {
4141

4242
### Optional
4343

44-
- `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))
44+
- `elasticsearch_connection` (Block List, Deprecated) Elasticsearch connection configuration block. (see [below for nested schema](#nestedblock--elasticsearch_connection))
4545
- `enabled` (Boolean) Specifies whether the user is enabled. The default value is true.
46-
- `password` (String, Sensitive) The users password. Passwords must be at least 6 characters long.
47-
- `password_hash` (String, Sensitive) A hash of the users password. This must be produced using the same hashing algorithm as has been configured for password storage (see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-settings.html#hashing-settings).
46+
- `password` (String, Sensitive) The user's password. Passwords must be at least 6 characters long.
47+
- `password_hash` (String, Sensitive) A hash of the user's password. This must be produced using the same hashing algorithm as has been configured for password storage (see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-settings.html#hashing-settings).
4848

4949
### Read-Only
5050

docs/resources/kibana_security_role.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,7 @@ resource "elasticstack_kibana_security_role" "example" {
124124

125125
### Optional
126126

127+
- `description` (String) Optional description for the role
127128
- `kibana` (Block Set) The list of objects that specify the Kibana privileges for the role. (see [below for nested schema](#nestedblock--kibana))
128129
- `metadata` (String) Optional meta-data.
129130

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
---
2+
subcategory: "Kibana"
3+
layout: ""
4+
page_title: "Elasticstack: elasticstack_kibana_synthetics_parameter Resource"
5+
description: |-
6+
Creates or updates a Kibana synthetics parameter.
7+
---
8+
9+
# Resource: elasticstack_kibana_synthetics_parameter
10+
11+
Creates or updates a Kibana synthetics parameter.
12+
See [Working with secrets and sensitive values](https://www.elastic.co/docs/solutions/observability/synthetics/work-with-params-secrets)
13+
and [API docs](https://www.elastic.co/docs/api/doc/kibana/group/endpoint-synthetics)
14+
15+
## Example Usage
16+
17+
```terraform
18+
provider "elasticstack" {
19+
kibana {}
20+
}
21+
22+
resource "elasticstack_kibana_synthetics_parameter" "example" {
23+
key = "example_key"
24+
value = "example_value"
25+
description = "Example description"
26+
tags = ["tag-a", "tag-b"]
27+
}
28+
```
29+
30+
<!-- schema generated by tfplugindocs -->
31+
## Schema
32+
33+
### Required
34+
35+
- `key` (String) The key of the parameter.
36+
- `value` (String, Sensitive) The value associated with the parameter.
37+
38+
### Optional
39+
40+
- `description` (String) A description of the parameter.
41+
- `share_across_spaces` (Boolean) Whether the parameter should be shared across spaces.
42+
- `tags` (List of String) An array of tags to categorize the parameter.
43+
44+
### Read-Only
45+
46+
- `id` (String) Generated id for the parameter.
47+
48+
## Import
49+
50+
Import is supported using the following syntax:
51+
52+
```shell
53+
terraform import elasticstack_kibana_synthetics_parameter.my_param <space id>/<param_id>
54+
```

0 commit comments

Comments
 (0)