terraform-provider-elasticstack
terraform-provider-elasticstack copied to clipboard
[Feature] Support for Fleet
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
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.
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?
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.
+1
+1
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.
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.)
+1
elastic/kibana#155044 is closed by elastic/kibana#160921, since some months. Are there any plans to proceed with this one?
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.
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