Conversation
|
@rStelmach Do we have any progress on this feature? This is critical for us to begin wide adoption of the new capabilities introduced by steams. |
Hi @insukcho, we're awaiting a few PRs to be merged on the Kibana side. Once they're in we will Terraform support for Streams merged very soon! |
|
@insukcho Unfortunately we had to put this on hold as we needed to do some changes in Streams OpenAPI spec Right now as @CoenWarmer mentioned, it's in progress. We will keep you updated 🙂 |
|
@CoenWarmer @rStelmach https://github.com/elastic/streams-program/issues/683 has been merged a month ago! Are we resuming this issue now? Any rough ETA I can share to the customer? |
Summary
Add a new
elasticstack_kibana_streamTerraform resource backed by the mainkbapiKibana client, plus a small internal condition model and Streams API helpers, to validate the first end‑to‑end integration between Terraform and Streams.This POC focuses on group streams, base‑stream creation, and a read‑only view of ingest, without committing yet to a final public Terraform schema for all Streams features.
What this PR changes
Streams API helpers (
internal/clients/kibana_oapi/streams.go)kbapi.ClientWithResponseson top of the Kibana HTTP client.EnableStreams/DisableStreams(POST /api/streams/_enable|_disable),GetStreamJSON,PutStreamRaw,DeleteStream(with the"Expected undefined, received null"quirk handled),GetStreamIngestJSON/PutStreamIngest,GetStreamGroupJSON/PutStreamGroup.New Terraform resource:
elasticstack_kibana_stream(internal/kibana/streams)provider/plugin_framework.goviastreams.NewResource.id,name,space_id,description,type,create_if_missing.group { members, metadata, tags }– managed via/api/streams/{name}/_group.ingest { type }– computed, read‑only from/api/streams/{name}/_ingestin this POC._group, round‑tripmembers/metadata/tags, and delete viaDELETE /api/streams/{name}with quirks handled._ingestbut does not write it yet) .Internal condition expression model (
internal/kibana/streams/conditions.go)Condition,FieldComparison,And,Or) plusMarshalConditionhelper.conditions_test.goverify JSON output for simple and nested trees.Testing
Kibana's side :
Terraform side
go test ./internal/kibana/streams/...(condition model + flatten/expand helpers).main.tfmake build.terraform initterraform applycreate_if_missing = true,_groupupsert, and round‑trip ofmembers/metadata/tags.ingest.typepopulated from_ingest, no writes to_ingest).