Skip to content

Commit 1a1f46c

Browse files
authored
Merge branch 'main' into copilot/fix-7855e918-4f89-4206-9e30-02dc9febbc48
2 parents 5590c1c + 15e62bf commit 1a1f46c

File tree

60 files changed

+7368
-2811
lines changed

Some content is hidden

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

60 files changed

+7368
-2811
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.4@sha256:e68f6a00e88586577fafa4d9cefad1349c2be70d21244321321c407474ff9bf2"
4+
image: "golang:1.25.4@sha256:698183780de28062f4ef46f82a79ec0ae69d2d22f7b160cf69f71ea8d98bf25d"
55
cpu: "16"
66
memory: "24G"
77
ephemeralStorage: "20G"

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ jobs:
2323
contents: read
2424

2525
steps:
26-
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5
27-
- uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00 # v6
26+
- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6
27+
- uses: actions/setup-go@4dc6199c7b1a012772edbd06daecab0f50c9053c # v6
2828
with:
2929
go-version-file: 'go.mod'
3030
cache: true

.github/workflows/test.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ jobs:
1818
runs-on: ubuntu-latest
1919
timeout-minutes: 5
2020
steps:
21-
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5
22-
- uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00 # v6
21+
- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6
22+
- uses: actions/setup-go@4dc6199c7b1a012772edbd06daecab0f50c9053c # v6
2323
with:
2424
go-version-file: 'go.mod'
2525
cache: true
@@ -34,8 +34,8 @@ jobs:
3434
name: Lint
3535
runs-on: ubuntu-latest
3636
steps:
37-
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5
38-
- uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00 # v6
37+
- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6
38+
- uses: actions/setup-go@4dc6199c7b1a012772edbd06daecab0f50c9053c # v6
3939
with:
4040
go-version-file: 'go.mod'
4141
cache: true
@@ -139,8 +139,8 @@ jobs:
139139
- version: '8.4.3'
140140
runner: ubuntu-22.04
141141
steps:
142-
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5
143-
- uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00 # v6
142+
- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6
143+
- uses: actions/setup-go@4dc6199c7b1a012772edbd06daecab0f50c9053c # v6
144144
with:
145145
go-version-file: 'go.mod'
146146
cache: true

CHANGELOG.md

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

3+
- Support `.bedrock` and `.gen-ai` connectors ([#1467](https://github.com/elastic/terraform-provider-elasticstack/pull/1467))
4+
- Support the `solution` attribute in `elasticstack_kibana_space` from 8.16 ([#1486](https://github.com/elastic/terraform-provider-elasticstack/pull/1486))
5+
6+
## [0.12.2] - 2025-11-19
37
- Fix `elasticstack_elasticsearch_snapshot_lifecycle` metadata type conversion causing terraform apply to fail ([#1409](https://github.com/elastic/terraform-provider-elasticstack/issues/1409))
48
- Add new `elasticstack_elasticsearch_ml_anomaly_detection_job` resource ([#1329](https://github.com/elastic/terraform-provider-elasticstack/pull/1329))
59
- Add new `elasticstack_elasticsearch_ml_datafeed` resource ([#1340](https://github.com/elastic/terraform-provider-elasticstack/pull/1340))
610
- Add `space_ids` attribute to all Fleet resources to support space-aware Fleet resource management ([#1390](https://github.com/elastic/terraform-provider-elasticstack/pull/1390))
11+
- Add back missing import support for `elasticstack_elasticsearch_security_role_mapping` ([#1441](https://github.com/elastic/terraform-provider-elasticstack/pull/1441))
712
- Add new `elasticstack_elasticsearch_ml_job_state` resource ([#1337](https://github.com/elastic/terraform-provider-elasticstack/pull/1337))
813
- Add new `elasticstack_elasticsearch_ml_datafeed_state` resource ([#1422](https://github.com/elastic/terraform-provider-elasticstack/pull/1422))
14+
- Add `output_id` to `elasticstack_fleet_integration_policy` resource ([#1445](https://github.com/elastic/terraform-provider-elasticstack/pull/1445))
15+
- Make `hosts` attribute required in `elasticstack_fleet_output` resource ([#1450](https://github.com/elastic/terraform-provider-elasticstack/pull/1450/files))
16+
- Fix `elasticstack_kibana_security_detection_rule` to properly respect `space_id`
917

1018
## [0.12.1] - 2025-10-22
1119
- Fix regression restricting the characters in an `elasticstack_elasticsearch_role_mapping` `name`. ([#1373](https://github.com/elastic/terraform-provider-elasticstack/pull/1373))
@@ -534,7 +542,8 @@ resource "elasticstack_fleet_output" "output" {
534542
- Initial set of docs
535543
- CI integration
536544
537-
[Unreleased]: https://github.com/elastic/terraform-provider-elasticstack/compare/v0.12.1...HEAD
545+
[Unreleased]: https://github.com/elastic/terraform-provider-elasticstack/compare/v0.12.2...HEAD
546+
[0.12.2]: https://github.com/elastic/terraform-provider-elasticstack/compare/v0.12.1...v0.12.2
538547
[0.12.1]: https://github.com/elastic/terraform-provider-elasticstack/compare/v0.12.0...v0.12.1
539548
[0.12.0]: https://github.com/elastic/terraform-provider-elasticstack/compare/v0.11.18...v0.12.0
540549
[0.11.19]: https://github.com/elastic/terraform-provider-elasticstack/compare/v0.11.18...v0.11.19

Makefile

Lines changed: 8 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.1
4+
VERSION ?= 0.12.2
55

66
NAME = elasticstack
77
BINARY = terraform-provider-${NAME}
@@ -46,6 +46,12 @@ build-ci: ## build the terraform provider
4646
.PHONY: build
4747
build: lint build-ci ## build the terraform provider
4848

49+
# run acceptance tests against the docker container that has been started with `make docker-kibana` (or `make docker-elasticsearch`)
50+
# To run specific test (e.g. TestAccResourceActionConnector) execute `make testacc-vs-docker TESTARGS='-run ^TestAccResourceKibanaConnectorBedrock$$'`
51+
.PHONY: testacc-vs-docker
52+
testacc-vs-docker:
53+
@ ELASTICSEARCH_ENDPOINTS=http://localhost:9200 KIBANA_ENDPOINT=http://localhost:5601 ELASTICSEARCH_USERNAME=$(ELASTICSEARCH_USERNAME) ELASTICSEARCH_PASSWORD=$(ELASTICSEARCH_PASSWORD) make testacc
54+
4955
.PHONY: testacc
5056
testacc: ## Run acceptance tests
5157
TF_ACC=1 go tool gotestsum --format testname --rerun-fails=3 --packages="-v ./..." -- -count $(ACCTEST_COUNT) -parallel $(ACCTEST_PARALLELISM) $(TESTARGS) -timeout $(ACCTEST_TIMEOUT)
@@ -130,7 +136,7 @@ install: build ## Install built provider into the local terraform cache
130136

131137
.PHONY: tools
132138
tools: $(GOBIN) ## Download golangci-lint locally if necessary.
133-
@[[ -f $(GOBIN)/golangci-lint ]] || curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(GOBIN) v2.6.1
139+
@[[ -f $(GOBIN)/golangci-lint ]] || curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(GOBIN) v2.6.2
134140

135141
.PHONY: golangci-lint
136142
golangci-lint:

docs/resources/fleet_integration_policy.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,8 @@ resource "elasticstack_fleet_integration_policy" "sample" {
6363
agent_policy_id = elasticstack_fleet_agent_policy.sample.policy_id
6464
integration_name = elasticstack_fleet_integration.sample.name
6565
integration_version = elasticstack_fleet_integration.sample.version
66+
// Optional: specify a custom output to send data to
67+
// output_id = "my-custom-output-id"
6668
6769
input {
6870
input_id = "tcp-tcp"
@@ -102,6 +104,7 @@ resource "elasticstack_fleet_integration_policy" "sample" {
102104
- `enabled` (Boolean) Enable the integration policy.
103105
- `force` (Boolean) Force operations, such as creation and deletion, to occur.
104106
- `input` (Block List) Integration inputs. (see [below for nested schema](#nestedblock--input))
107+
- `output_id` (String) The ID of the output to send data to. When not specified, the default output of the agent policy will be used.
105108
- `policy_id` (String) Unique identifier of the integration policy.
106109
- `space_ids` (Set of String) The Kibana space IDs where this integration policy is available. When set, must match the space_ids of the referenced agent policy. If not set, will be inherited from the agent policy. Note: The order of space IDs does not matter as this is a set.
107110
- `vars_json` (String, Sensitive) Integration-level variables as JSON.

docs/resources/fleet_output.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,7 @@ resource "elasticstack_fleet_output" "kafka_round_robin" {
200200

201201
### Required
202202

203+
- `hosts` (List of String) A list of hosts.
203204
- `name` (String) The name of the output.
204205
- `type` (String) The output type.
205206

@@ -210,7 +211,6 @@ resource "elasticstack_fleet_output" "kafka_round_robin" {
210211
- `config_yaml` (String, Sensitive) Advanced YAML configuration. YAML settings here will be added to the output section of each agent policy.
211212
- `default_integrations` (Boolean) Make this output the default for agent integrations.
212213
- `default_monitoring` (Boolean) Make this output the default for agent monitoring.
213-
- `hosts` (List of String) A list of hosts.
214214
- `kafka` (Attributes) Kafka-specific configuration. (see [below for nested schema](#nestedatt--kafka))
215215
- `output_id` (String) Unique identifier of the output.
216216
- `space_ids` (Set of String) The Kibana space IDs where this output is available. When set, the output will be created and managed within the specified space. Note: The order of space IDs does not matter as this is a set.

docs/resources/kibana_action_connector.md

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,44 @@ resource "elasticstack_kibana_action_connector" "slack-api-connector" {
5252
token = "<your-token>"
5353
})
5454
}
55+
56+
resource "elasticstack_kibana_action_connector" "bedrock-connector" {
57+
name = "aws-bedrock"
58+
connector_type_id = ".bedrock"
59+
config = jsonencode({
60+
apiUrl = "https://bedrock-runtime.us-east-1.amazonaws.com"
61+
defaultModel = "anthropic.claude-v2"
62+
})
63+
secrets = jsonencode({
64+
accessKey = "<your-aws-access-key>"
65+
secret = "<your-aws-secret-key>"
66+
})
67+
}
68+
69+
resource "elasticstack_kibana_action_connector" "genai-openai-connector" {
70+
name = "openai"
71+
connector_type_id = ".gen-ai"
72+
config = jsonencode({
73+
apiProvider = "OpenAI"
74+
apiUrl = "https://api.openai.com/v1"
75+
defaultModel = "gpt-4"
76+
})
77+
secrets = jsonencode({
78+
apiKey = "<your-openai-api-key>"
79+
})
80+
}
81+
82+
resource "elasticstack_kibana_action_connector" "genai-azure-connector" {
83+
name = "azure-openai"
84+
connector_type_id = ".gen-ai"
85+
config = jsonencode({
86+
apiProvider = "Azure OpenAI"
87+
apiUrl = "https://my-resource.openai.azure.com/openai/deployments/my-deployment"
88+
})
89+
secrets = jsonencode({
90+
apiKey = "<your-azure-api-key>"
91+
})
92+
}
5593
```
5694

5795
<!-- schema generated by tfplugindocs -->

examples/resources/elasticstack_fleet_integration_policy/resource.tf

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ resource "elasticstack_fleet_integration_policy" "sample" {
3232
agent_policy_id = elasticstack_fleet_agent_policy.sample.policy_id
3333
integration_name = elasticstack_fleet_integration.sample.name
3434
integration_version = elasticstack_fleet_integration.sample.version
35+
// Optional: specify a custom output to send data to
36+
// output_id = "my-custom-output-id"
3537

3638
input {
3739
input_id = "tcp-tcp"

examples/resources/elasticstack_kibana_action_connector/resource.tf

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,3 +37,41 @@ resource "elasticstack_kibana_action_connector" "slack-api-connector" {
3737
token = "<your-token>"
3838
})
3939
}
40+
41+
resource "elasticstack_kibana_action_connector" "bedrock-connector" {
42+
name = "aws-bedrock"
43+
connector_type_id = ".bedrock"
44+
config = jsonencode({
45+
apiUrl = "https://bedrock-runtime.us-east-1.amazonaws.com"
46+
defaultModel = "anthropic.claude-v2"
47+
})
48+
secrets = jsonencode({
49+
accessKey = "<your-aws-access-key>"
50+
secret = "<your-aws-secret-key>"
51+
})
52+
}
53+
54+
resource "elasticstack_kibana_action_connector" "genai-openai-connector" {
55+
name = "openai"
56+
connector_type_id = ".gen-ai"
57+
config = jsonencode({
58+
apiProvider = "OpenAI"
59+
apiUrl = "https://api.openai.com/v1"
60+
defaultModel = "gpt-4"
61+
})
62+
secrets = jsonencode({
63+
apiKey = "<your-openai-api-key>"
64+
})
65+
}
66+
67+
resource "elasticstack_kibana_action_connector" "genai-azure-connector" {
68+
name = "azure-openai"
69+
connector_type_id = ".gen-ai"
70+
config = jsonencode({
71+
apiProvider = "Azure OpenAI"
72+
apiUrl = "https://my-resource.openai.azure.com/openai/deployments/my-deployment"
73+
})
74+
secrets = jsonencode({
75+
apiKey = "<your-azure-api-key>"
76+
})
77+
}

0 commit comments

Comments
 (0)