Skip to content

Commit

Permalink
Fix issue 25 about logstash pipeline settings type (#32)
Browse files Browse the repository at this point in the history
* fix: update terraform framework. Bum to go 1.19. Fix issue 25 about pipeline settings type

Signed-off-by: disaster37 <[email protected]>

* fix: fix docs

Signed-off-by: disaster37 <[email protected]>

Signed-off-by: disaster37 <[email protected]>
  • Loading branch information
disaster37 authored Nov 8, 2022
1 parent 6023be2 commit 54cc0af
Show file tree
Hide file tree
Showing 28 changed files with 448 additions and 660 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
- name: Setup Go
uses: actions/setup-go@v2
with:
go-version: "1.17"
go-version: "1.19"
- name: Setup Elasticsearch / Kibana
run: |
set -e
Expand Down Expand Up @@ -56,7 +56,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.17
go-version: 1.19
- name: Import GPG key
id: import_gpg
uses: paultyng/[email protected]
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,8 @@ endif
@$(MAKE) -C $(GOPATH)/src/$(WEBSITE_REPO) website-provider-test PROVIDER_PATH=$(shell pwd) PROVIDER_NAME=$(PKG_NAME)

start-pods: clean-pods
kubectl run elasticsearch --image docker.elastic.co/elasticsearch/elasticsearch:8.0.1 --port "9200" --expose --env "cluster.name=test" --env "discovery.type=single-node" --env "ELASTIC_PASSWORD=changeme" --env "xpack.security.enabled=true" --env "ES_JAVA_OPTS=-Xms512m -Xmx512m" --env "path.repo=/tmp" --limits "cpu=500m,memory=1024Mi"
kubectl run kibana --image docker.elastic.co/kibana/kibana:8.0.1 --expose --port "5601" --env "ELASTICSEARCH_HOSTS=http://elasticsearch:9200" --env "ELASTICSEARCH_USERNAME=kibana_system" --env "ELASTICSEARCH_PASSWORD=changeme" --limits "cpu=500m,memory=1Gi"
kubectl run elasticsearch --image docker.elastic.co/elasticsearch/elasticsearch:8.5.0 --port "9200" --expose --env "cluster.name=test" --env "discovery.type=single-node" --env "ELASTIC_PASSWORD=changeme" --env "xpack.security.enabled=true" --env "ES_JAVA_OPTS=-Xms512m -Xmx512m" --env "path.repo=/tmp" --limits "cpu=500m,memory=1024Mi"
kubectl run kibana --image docker.elastic.co/kibana/kibana:8.5.0 --expose --port "5601" --env "ELASTICSEARCH_HOSTS=http://elasticsearch:9200" --env "ELASTICSEARCH_USERNAME=kibana_system" --env "ELASTICSEARCH_PASSWORD=changeme" --limits "cpu=500m,memory=1Gi"
echo "Waiting for Elasticsearch availability"
until curl -s http://elasticsearch:9200 | grep -q 'missing authentication credentials'; do sleep 30; done;
echo "Setting kibana_system password"
Expand Down
4 changes: 2 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ version: "3"

services:
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:8.0.1
image: docker.elastic.co/elasticsearch/elasticsearch:8.5.0
hostname: elasticsearch
environment:
cluster.name: test
Expand All @@ -14,7 +14,7 @@ services:
ports:
- 9200:9200
kibana:
image: docker.elastic.co/kibana/kibana:8.0.1
image: docker.elastic.co/kibana/kibana:8.5.0
hostname: kibana
depends_on:
- "elasticsearch"
Expand Down
1 change: 1 addition & 0 deletions docs/resources/kibana_copy_object.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ You can see the API documentation: https://www.elastic.co/guide/en/kibana/master

***Supported Kibana version:***
- v7
- v8

## Example Usage

Expand Down
19 changes: 15 additions & 4 deletions docs/resources/kibana_logstash_pipeline.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ You can see the API documentation: https://www.elastic.co/guide/en/kibana/master

***Supported Kibana version:***
- v7
- v8

## Example Usage

Expand All @@ -15,8 +16,9 @@ resource kibana_logstash_pipeline "test" {
name = "terraform-test"
description = "test"
pipeline = "input { stdin {} } output { stdout {} }"
settings = {
"queue.type" = "persisted"
settings {
queue_type = "persisted"
pipeline_workers = 2
}
}
```
Expand All @@ -27,8 +29,17 @@ resource kibana_logstash_pipeline "test" {
- **name**: (required) The unique name of logstash pipeline
- **description**: (optional) The logstash pipeline description
- **pipeline**: (required) The pipeline specification as JSON string.
- **settings**: (optional) The extra logstash pipeline settings, as map of string.

- **settings**: (optional) The extra logstash pipeline settings, as object.

*** Settings object:***
- **pipeline_workers**: (optional)
- **pipeline_batch_size**: (optional)
- **pipeline_batch_delay**: (optional)
- **pipeline_ecs_compatibility**: (optional)
- **pipeline_ordored**: (optional)
- **queue_type**: (optional)
- **queue_max_bytes**: (optional)
- **queue_checkpoint_writes**: (optional)


## Attribute Reference
Expand Down
1 change: 1 addition & 0 deletions docs/resources/kibana_object.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ You can see the API documentation: https://www.elastic.co/guide/en/kibana/master

***Supported Kibana version:***
- v7
- v8

## Example Usage

Expand Down
1 change: 1 addition & 0 deletions docs/resources/kibana_role.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ You can see the API documentation: https://www.elastic.co/guide/en/kibana/master

***Supported Kibana version:***
- v7
- v8

## Example Usage

Expand Down
1 change: 1 addition & 0 deletions docs/resources/kibana_user_space.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ You can see the API documentation: https://www.elastic.co/guide/en/kibana/master

***Supported Kibana version:***
- v7
- v8

## Example Usage

Expand Down
70 changes: 32 additions & 38 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,68 +1,62 @@
module github.com/disaster37/terraform-provider-kibana/v8

go 1.17
go 1.19

require (
github.com/coreos/go-semver v0.3.0
github.com/disaster37/go-kibana-rest/v7 v7.12.1-3
github.com/hashicorp/terraform-plugin-sdk/v2 v2.10.1
github.com/disaster37/go-kibana-rest/v8 v8.5.0
github.com/elastic/go-ucfg v0.8.6
github.com/hashicorp/terraform-plugin-sdk/v2 v2.24.0
github.com/pkg/errors v0.9.1
github.com/sirupsen/logrus v1.8.1
github.com/sirupsen/logrus v1.9.0
github.com/t-tomalak/logrus-easy-formatter v0.0.0-20190827215021-c074f06c5816
github.com/x-cray/logrus-prefixed-formatter v0.5.2
)

require (
github.com/agext/levenshtein v1.2.3 // indirect
github.com/agext/levenshtein v1.2.2 // indirect
github.com/apparentlymart/go-textseg/v13 v13.0.0 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/elastic/go-ucfg v0.8.4 // indirect
github.com/fatih/color v1.13.0 // indirect
github.com/go-resty/resty/v2 v2.7.0 // indirect
github.com/golang/protobuf v1.5.2 // indirect
github.com/google/go-cmp v0.5.7 // indirect
github.com/hashicorp/errwrap v1.1.0 // indirect
github.com/google/go-cmp v0.5.9 // indirect
github.com/hashicorp/errwrap v1.0.0 // indirect
github.com/hashicorp/go-checkpoint v0.5.0 // indirect
github.com/hashicorp/go-cleanhttp v0.5.2 // indirect
github.com/hashicorp/go-cty v1.4.1-0.20200414143053-d3edf31b6320 // indirect
github.com/hashicorp/go-hclog v1.1.0 // indirect
github.com/hashicorp/go-hclog v1.2.1 // indirect
github.com/hashicorp/go-multierror v1.1.1 // indirect
github.com/hashicorp/go-plugin v1.4.3 // indirect
github.com/hashicorp/go-uuid v1.0.2 // indirect
github.com/hashicorp/go-version v1.4.0 // indirect
github.com/hashicorp/hc-install v0.3.1 // indirect
github.com/hashicorp/hcl/v2 v2.11.1 // indirect
github.com/hashicorp/go-plugin v1.4.4 // indirect
github.com/hashicorp/go-uuid v1.0.3 // indirect
github.com/hashicorp/go-version v1.6.0 // indirect
github.com/hashicorp/hc-install v0.4.0 // indirect
github.com/hashicorp/hcl/v2 v2.14.1 // indirect
github.com/hashicorp/logutils v1.0.0 // indirect
github.com/hashicorp/terraform-exec v0.16.0 // indirect
github.com/hashicorp/terraform-json v0.13.0 // indirect
github.com/hashicorp/terraform-plugin-go v0.7.1 // indirect
github.com/hashicorp/terraform-plugin-log v0.2.1 // indirect
github.com/hashicorp/terraform-registry-address v0.0.0-20220131103327-5c1c5e123275 // indirect
github.com/hashicorp/terraform-exec v0.17.3 // indirect
github.com/hashicorp/terraform-json v0.14.0 // indirect
github.com/hashicorp/terraform-plugin-go v0.14.0 // indirect
github.com/hashicorp/terraform-plugin-log v0.7.0 // indirect
github.com/hashicorp/terraform-registry-address v0.0.0-20220623143253-7d51757b572c // indirect
github.com/hashicorp/terraform-svchost v0.0.0-20200729002733-f050f53b9734 // indirect
github.com/hashicorp/yamux v0.0.0-20211028200310-0bc27b27de87 // indirect
github.com/hashicorp/yamux v0.0.0-20181012175058-2f1d1f20f75d // indirect
github.com/mattn/go-colorable v0.1.12 // indirect
github.com/mattn/go-isatty v0.0.14 // indirect
github.com/mgutz/ansi v0.0.0-20200706080929-d51e80ef957d // indirect
github.com/mitchellh/copystructure v1.2.0 // indirect
github.com/mitchellh/go-testing-interface v1.14.1 // indirect
github.com/mitchellh/go-wordwrap v1.0.1 // indirect
github.com/mitchellh/mapstructure v1.4.3 // indirect
github.com/mitchellh/go-wordwrap v1.0.0 // indirect
github.com/mitchellh/mapstructure v1.5.0 // indirect
github.com/mitchellh/reflectwalk v1.0.2 // indirect
github.com/oklog/run v1.1.0 // indirect
github.com/onsi/ginkgo v1.16.5 // indirect
github.com/onsi/gomega v1.18.1 // indirect
github.com/oklog/run v1.0.0 // indirect
github.com/vmihailenco/msgpack v4.0.4+incompatible // indirect
github.com/vmihailenco/msgpack/v4 v4.3.12 // indirect
github.com/vmihailenco/tagparser v0.1.1 // indirect
github.com/zclconf/go-cty v1.10.0 // indirect
golang.org/x/crypto v0.0.0-20220214200702-86341886e292 // indirect
golang.org/x/net v0.0.0-20220225172249-27dd8689420f // indirect
golang.org/x/sys v0.0.0-20220227234510-4e6760a101f9 // indirect
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 // indirect
golang.org/x/text v0.3.7 // indirect
google.golang.org/appengine v1.6.7 // indirect
google.golang.org/genproto v0.0.0-20220304144024-325a89244dc8 // indirect
google.golang.org/grpc v1.44.0 // indirect
google.golang.org/protobuf v1.27.1 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
github.com/zclconf/go-cty v1.11.0 // indirect
golang.org/x/crypto v0.1.0 // indirect
golang.org/x/net v0.1.0 // indirect
golang.org/x/sys v0.1.0 // indirect
golang.org/x/text v0.4.0 // indirect
google.golang.org/appengine v1.6.6 // indirect
google.golang.org/genproto v0.0.0-20200711021454-869866162049 // indirect
google.golang.org/grpc v1.48.0 // indirect
google.golang.org/protobuf v1.28.1 // indirect
)
Loading

0 comments on commit 54cc0af

Please sign in to comment.