terraform-provider-elasticstack icon indicating copy to clipboard operation
terraform-provider-elasticstack copied to clipboard

[Feature] Support for Fleet

Open RichiCoder1 opened this issue 2 years ago • 1 comments

Is your feature request related to a problem? Please describe. At least right now, setting up Agent Policies and integration is a point and click operation. This gets especially difficult when setup up multiple different integrations across multiple policies, often with not too much variance.

Describe the resource you would like to have implemented. https://www.elastic.co/guide/en/fleet/current/fleet-api-docs.html

RichiCoder1 avatar Mar 15 '22 22:03 RichiCoder1

Definitely would be a fan of this, currently using a standalone agent with terraform yaml template because there isn't a good way to add 500+ integrations to a single policy with many small changes.

BenB196 avatar Mar 25 '22 19:03 BenB196

I'm super ++ on this.

I would definitely love to be able to set up policies for the agent using Terraform

For now, I assume the only way of doing it is to access the API from terraform as described in https://github.com/elastic/kibana/issues/132263?

lucasfcosta avatar Feb 02 '23 17:02 lucasfcosta

https://github.com/elastic/kibana/issues/155044 is related to development of a resource type for controlling Fleet package policies. This API enhancment will make developing the terraform resource type simpler.

andrewkroh avatar Apr 18 '23 14:04 andrewkroh

+1

fludo avatar Apr 25 '23 06:04 fludo

+1

traut avatar May 08 '23 17:05 traut

ICYMI Fleet (partial) support was released with 0.6.0 last week. So far limited to

elasticstack_fleet_agent_policy elasticstack_fleet_output elasticstack_fleet_server_host

But it's a good start.

yohancourbe avatar Jun 01 '23 11:06 yohancourbe

Support was added in 0.6.0 for some resource types. We are waiting on changes to the Fleet API as tracked in https://github.com/elastic/kibana/issues/155044 before adding a resource type to manage package policies (this is what lets you add an integration package to an agent policy).

(Here is my personal workaround until that becomes available which uses Mastercard/restapi.)

andrewkroh avatar Jun 01 '23 11:06 andrewkroh

+1

bbayszczak avatar Jul 21 '23 15:07 bbayszczak

elastic/kibana#155044 is closed by elastic/kibana#160921, since some months. Are there any plans to proceed with this one?

breml avatar Oct 20 '23 07:10 breml

I looked a little bit deeper into this topic and I wonder, if waiting for #elastic/kibana/155044 as stated in https://github.com/elastic/terraform-provider-elasticstack/issues/89#issuecomment-1571913779 by @andrewkroh basically means, that the terraform provider will only be able to work with package_policy resources with the new (yet to be released) version of Kibana, since the new API capabilities with the different format setting (simplified) is planned to be used. This would be a major draw-back for me, since it boils down to us not being able to use this terraform provider to manager package_policies until we have updated to the respective version (which might take a while in a corporate environment). This is would be very unfortunate.

breml avatar Oct 27 '23 10:10 breml

For all those watching this issue, looks like the resource side of this functionality was added in v0.10.0 via https://github.com/elastic/terraform-provider-elasticstack/pull/454

BenB196 avatar Nov 02 '23 11:11 BenB196