Skip to content

Commit

Permalink
Add SLO support to provider (#385)
Browse files Browse the repository at this point in the history
  • Loading branch information
wandergeek authored Aug 16, 2023
1 parent 21cb31d commit 9be9f1f
Show file tree
Hide file tree
Showing 102 changed files with 10,231 additions and 2,230 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
## [Unreleased]

### Added
- Add support for Kibana SLOs ([#385](https://github.com/elastic/terraform-provider-elasticstack/pull/385))

## [0.6.2] - 2023-06-19

### Added
Expand Down
16 changes: 11 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ SWAGGER_VERSION ?= 8.7

GOVERSION ?= 1.19

STACK_VERSION ?= 8.6.0
STACK_VERSION ?= 8.9.0

ELASTICSEARCH_NAME ?= terraform-elasticstack-es
ELASTICSEARCH_ENDPOINTS ?= http://$(ELASTICSEARCH_NAME):9200
Expand Down Expand Up @@ -84,6 +84,7 @@ docker-testacc: docker-elasticsearch docker-kibana ## Run acceptance tests in th

.PHONY: docker-elasticsearch
docker-elasticsearch: docker-network ## Start Elasticsearch single node cluster in docker container
@ docker rm -f $(ELASTICSEARCH_NAME) &> /dev/null || true
@ $(call retry, 5, if ! docker ps --format '{{.Names}}' | grep -w $(ELASTICSEARCH_NAME) > /dev/null 2>&1 ; then \
docker run -d \
--memory $(ELASTICSEARCH_MEM) \
Expand All @@ -103,6 +104,7 @@ docker-elasticsearch: docker-network ## Start Elasticsearch single node cluster

.PHONY: docker-kibana
docker-kibana: docker-network docker-elasticsearch set-kibana-password ## Start Kibana node in docker container
@ docker rm -f $(KIBANA_NAME) &> /dev/null || true
@ $(call retry, 5, if ! docker ps --format '{{.Names}}' | grep -w $(KIBANA_NAME) > /dev/null 2>&1 ; then \
docker run -d \
-p 5601:5601 \
Expand Down Expand Up @@ -256,18 +258,22 @@ generate-connectors-client: tools ## generate Kibana connectors client
@ cd tools && go generate
@ go fmt ./generated/connectors/...

## -i https://raw.githubusercontent.com/elastic/kibana/main/x-pack/plugins/observability/docs/openapi/slo/bundled.yaml \
.PHONY: generate-slo-client
generate-slo-client: tools ## generate Kibana slo client
@ docker run --rm -v "${PWD}:/local" openapitools/openapi-generator-cli generate \
-i https://raw.githubusercontent.com/elastic/kibana/master/x-pack/plugins/observability/docs/openapi/slo/bundled.yaml \
--skip-validate-spec \
@ rm -rf generated/slo
@ docker run --rm -v "${PWD}:/local" openapitools/openapi-generator-cli:v7.0.0-beta generate \
-i /local/generated/slo-spec.yml \
--git-repo-id terraform-provider-elasticstack \
--git-user-id elastic \
-p isGoSubmodule=true \
-p packageName=slo \
-p generateInterfaces=true \
-p useOneOfDiscriminatorLookup=true \
-g go \
-o /local/generated/slo
-o /local/generated/slo \
--type-mappings=float32=float64
@ rm -rf generated/slo/go.mod generated/slo/go.sum generated/slo/test
@ go fmt ./generated/...

Expand Down
Loading

0 comments on commit 9be9f1f

Please sign in to comment.