Skip to content

Latest commit

 

History

History
49 lines (36 loc) · 1.99 KB

File metadata and controls

49 lines (36 loc) · 1.99 KB
page_title elasticstack_fleet_enrollment_tokens Data Source - terraform-provider-elasticstack
subcategory Fleet
description Retrieves Elasticsearch API keys used to enroll Elastic Agents in Fleet. See the Fleet enrollment tokens documentation https://www.elastic.co/guide/en/fleet/current/fleet-enrollment-tokens.html for more details.

elasticstack_fleet_enrollment_tokens (Data Source)

Retrieves Elasticsearch API keys used to enroll Elastic Agents in Fleet. See the Fleet enrollment tokens documentation for more details.

Example Usage

provider "elasticstack" {
  kibana {}
}

data "elasticstack_fleet_enrollment_tokens" "test" {
  policy_id = "223b1bf8-240f-463f-8466-5062670d0754"
}

Schema

Optional

  • policy_id (String) The identifier of the target agent policy. When provided, only the enrollment tokens associated with this agent policy will be selected. Omit this value to select all enrollment tokens.
  • space_ids (List of String) The Kibana space IDs to query enrollment tokens from. When the agent policy is space-scoped, this must be set to match the policy's space. If not specified, queries the default space.

Read-Only

  • id (String) The ID of this resource.
  • tokens (Attributes List) A list of enrollment tokens. (see below for nested schema)

Nested Schema for tokens

Read-Only:

  • active (Boolean) Indicates if the enrollment token is active.
  • api_key (String, Sensitive) The API key.
  • api_key_id (String) The API key identifier.
  • created_at (String) The time at which the enrollment token was created.
  • key_id (String) The unique identifier of the enrollment token.
  • name (String) The name of the enrollment token.
  • policy_id (String) The identifier of the associated agent policy.