-
Notifications
You must be signed in to change notification settings - Fork 122
Description
Is your feature request related to a problem? Please describe.
Yes. When managing Fleet, I'm unable to fully automate our setup using Terraform because there's no way to assign an Agent Policy to a specific Kibana space. This prevents us from using an Infrastructure-as-Code approach for environments that rely on space-aware policies, forcing us to perform manual configuration steps in the UI after running Terraform.
Describe the resource you would like to have implemented.
The request is to enhance the existing elasticstack_fleet_agent_policy resource.
Describe the solution you'd like
I would like a new attribute, such as space_id, to be added to the elasticstack_fleet_agent_policy resource. This would allow a user to specify the ID of the Kibana space that the policy should belong to, enabling the creation and management of space-aware policies directly from Terraform.
For example:
resource "elasticstack_fleet_agent_policy" "space_aware_policy" {
name = "Policy for Marketing Space"
namespace = "default"
# Proposed new attribute
space_id = "marketing"
}Describe alternatives you've considered
The only alternative is to create the policies manually in the Kibana UI after the rest of the infrastructure has been deployed with Terraform. This is not a scalable or desirable solution as it circumvents the benefits of Infrastructure-as-Code.
Additional context
This feature is crucial for organizations that use Kibana spaces for multi-tenancy or to separate resources by team. This was observed in provider version 0.11.17 but appears to be a limitation in the current version as well.