Skip to content

Commit d99bf83

Browse files
authored
Merge branch 'main' into copilot/fix-7855e918-4f89-4206-9e30-02dc9febbc48
2 parents cdead36 + d55ffb1 commit d99bf83

File tree

157 files changed

+14535
-2325
lines changed

Some content is hidden

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

157 files changed

+14535
-2325
lines changed

.buildkite/hooks/pre-command

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22

33
set -euo pipefail
44

5+
if [[ "${BUILDKITE_PIPELINE_SLUG}" != "terraform-provider-elasticstack-release" ]]; then
6+
echo "Skipping pre-command hook for non-release pipeline"
7+
exit 0
8+
fi
9+
510
RELEASE_VAULT_PATH=kv/ci-shared/terraform-providers
611

712
if [[ "$BUILDKITE_PIPELINE_SLUG" == "terraform-provider-elasticstack-release" ]]; then

.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.1@sha256:d7098379b7da665ab25b99795465ec320b1ca9d4addb9f77409c4827dc904211"
4+
image: "golang:1.25.3@sha256:bce1e7ec780444d85d041889e7a0e542b0be7b272a7f46a5fb947f0f484b9736"
55
cpu: "16"
66
memory: "24G"
77
ephemeralStorage: "20G"
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
#!/bin/bash
2+
3+
set -euo pipefail
4+
5+
source /etc/profile.d/go.sh
6+
7+
echo "--- Regenerating the Kibana client"
8+
make -C generated/kbapi all
9+
10+
echo "--- Building the provider"
11+
make build
12+
13+
echo "--- Starting Stack containers"
14+
make docker-fleet
15+
docker ps
16+
sleep 30
17+
18+
echo "--- Collecting docker info"
19+
docker ps
20+
docker logs terraform-elasticstack-kb 2>&1 > kibana.log
21+
docker logs terraform-elasticstack-es 2>&1 > es.log
22+
docker logs terraform-elasticstack-fleet 2>&1 > fleet.log
23+
24+
buildkite-agent artifact upload kibana.log
25+
buildkite-agent artifact upload es.log
26+
buildkite-agent artifact upload fleet.log
27+
28+
echo "--- Running acceptance tests"
29+
ELASTICSEARCH_ENDPOINTS=http://localhost:9200 KIBANA_ENDPOINT=http://localhost:5601 ELASTICSEARCH_USERNAME=elastic ELASTICSEARCH_PASSWORD=password make testacc
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
agents:
2+
provider: "gcp"
3+
machineType: "n1-standard-4"
4+
image: family/terraform-provider-elasticstack-ubuntu-2204
5+
steps:
6+
- label: Regenerate Kibana client and build provider
7+
command:
8+
- ".buildkite/scripts/update-kibana-client.sh"

.github/workflows/test.yml

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ jobs:
5050
test:
5151
name: Matrix Acceptance Test
5252
needs: build
53-
runs-on: ubuntu-latest
53+
runs-on: ${{ matrix.runner == 'ubuntu-22.04' && 'ubuntu-22.04' || 'ubuntu-latest' }}
5454
env:
5555
ELASTIC_PASSWORD: password
5656
KIBANA_SYSTEM_USERNAME: kibana_system
@@ -108,11 +108,6 @@ jobs:
108108
matrix:
109109
version:
110110
- '7.17.13'
111-
- '8.0.1'
112-
- '8.1.3'
113-
- '8.2.3'
114-
- '8.3.3'
115-
- '8.4.3'
116111
- '8.5.3'
117112
- '8.6.2'
118113
- '8.7.1'
@@ -130,6 +125,17 @@ jobs:
130125
- '8.19.3'
131126
- '9.0.7'
132127
- '9.1.3'
128+
include:
129+
- version: '8.0.1'
130+
runner: ubuntu-22.04
131+
- version: '8.1.3'
132+
runner: ubuntu-22.04
133+
- version: '8.2.3'
134+
runner: ubuntu-22.04
135+
- version: '8.3.3'
136+
runner: ubuntu-22.04
137+
- version: '8.4.3'
138+
runner: ubuntu-22.04
133139
steps:
134140
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5
135141
- uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00 # v6

CHANGELOG.md

Lines changed: 50 additions & 1 deletion

Makefile

Lines changed: 2 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.11.17
4+
VERSION ?= 0.12.0
55

66
NAME = elasticstack
77
BINARY = terraform-provider-${NAME}
@@ -54,7 +54,7 @@ build: lint build-ci ## build the terraform provider
5454

5555
.PHONY: testacc
5656
testacc: ## Run acceptance tests
57-
TF_ACC=1 go test -v ./... -count $(ACCTEST_COUNT) -parallel $(ACCTEST_PARALLELISM) $(TESTARGS) -timeout $(ACCTEST_TIMEOUT)
57+
TF_ACC=1 go tool gotestsum --format testname --rerun-fails=3 --packages="-v ./..." -- -count $(ACCTEST_COUNT) -parallel $(ACCTEST_PARALLELISM) $(TESTARGS) -timeout $(ACCTEST_TIMEOUT)
5858

5959
.PHONY: test
6060
test: ## Run unit tests

catalog-info.yaml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,3 +35,42 @@ spec:
3535
access_level: MANAGE_BUILD_AND_READ
3636
everyone:
3737
access_level: READ_ONLY
38+
39+
---
40+
# yaml-language-server: $schema=https://gist.githubusercontent.com/elasticmachine/988b80dae436cafea07d9a4a460a011d/raw/e57ee3bed7a6f73077a3f55a38e76e40ec87a7cf/rre.schema.json
41+
apiVersion: backstage.io/v1alpha1
42+
kind: Resource
43+
metadata:
44+
name: buildkite-pipeline-tf-provider-elasticstack-update-kibana
45+
description: Buildkite Pipeline for updating Kibana client in Terraform provider Elasticstack
46+
links:
47+
- title: Pipeline
48+
url: https://buildkite.com/elastic/terraform-provider-elasticstack-update-kibana-client
49+
50+
spec:
51+
type: buildkite-pipeline
52+
owner: group:control-plane-hosted-applications
53+
system: buildkite
54+
implementation:
55+
apiVersion: buildkite.elastic.dev/v1
56+
kind: Pipeline
57+
metadata:
58+
name: terraform-provider-elasticstack / Update Kibana client
59+
description: Terraform provider Elasticstack - update Kibana client
60+
spec:
61+
repository: elastic/terraform-provider-elasticstack
62+
pipeline_file: ".buildkite/update-kibana-client.yml"
63+
provider_settings:
64+
build_branches: false
65+
build_pull_requests: false
66+
build_pull_request_labels_changed: false
67+
build_pull_request_ready_for_review: false
68+
build_pull_request_forks: false
69+
build_tags: false
70+
teams:
71+
control-plane-hosted-applications:
72+
access_level: MANAGE_BUILD_AND_READ
73+
serverless-core:
74+
access_level: MANAGE_BUILD_AND_READ
75+
everyone:
76+
access_level: READ_ONLY

docs/data-sources/elasticsearch_enrich_policy.md

Lines changed: 0 additions & 1 deletion

docs/data-sources/elasticsearch_index_template.md

Lines changed: 0 additions & 1 deletion

0 commit comments

Comments
 (0)