Skip to content

[Feature] Add param to configure the "inactive agent unenrollment timeout" Fleet Agent Policy #1169

Open
@nitishm

Description

@nitishm

Is your feature request related to a problem? Please describe.

The Elastic Fleet Agent Policy supports setting an "Inactive agent unenrollment timeout" to be configured with a timeout in seconds.

From the Elastic Fleet UI > Agent Policy > Settings tab,

Inactive agent unenrollment timeout
An optional timeout in seconds. If configured, inactive agents will be automatically unenrolled and their API keys will be invalidated after they've been inactive for this value in seconds. This can be useful for policies containing ephemeral agents, such as those in a Docker or Kubernetes environment.

Image

This is useful in ephemeral environments like Kubernetes, where there is constant churn of agents going offline/inactive as they get replaced.

However, the Fleet Agent Policy prevents itself from being deleted if there any number of agents (active or inactive/offline) associated with the policy, which poses a problem when trying to clean up resources (i.e. delete the Agent Policy) since terraform fails to delete the resource.

Describe the resource you would like to have implemented.

Add an option to pass the timeout value via the fleet_agent_policy resource.

Describe the solution you'd like

The ask is to add a field to the agentPolicyModel that gets propagated to UnenrollTimeout exposed in the generated API models.

Describe alternatives you've considered

The only other alternative is to manually cleanup the offline agents and also their associated API Keys.

Additional context
Add any other context or screenshots about the feature request here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions