From 046f5046654080b35ea7fb9e10db0b552da4371f Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 14 Nov 2025 19:20:20 +0000 Subject: [PATCH 1/3] Initial plan From 72c94023e1376ae32221d1f916cf319b9bd6de3e Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 14 Nov 2025 19:28:52 +0000 Subject: [PATCH 2/3] Change hosts attribute from Optional to Required in fleet output schema Co-authored-by: tobio <444668+tobio@users.noreply.github.com> --- docs/resources/fleet_output.md | 2 +- internal/fleet/output/schema.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/resources/fleet_output.md b/docs/resources/fleet_output.md index 0d57c199a..546d73e60 100644 --- a/docs/resources/fleet_output.md +++ b/docs/resources/fleet_output.md @@ -200,6 +200,7 @@ resource "elasticstack_fleet_output" "kafka_round_robin" { ### Required +- `hosts` (List of String) A list of hosts. - `name` (String) The name of the output. - `type` (String) The output type. @@ -210,7 +211,6 @@ resource "elasticstack_fleet_output" "kafka_round_robin" { - `config_yaml` (String, Sensitive) Advanced YAML configuration. YAML settings here will be added to the output section of each agent policy. - `default_integrations` (Boolean) Make this output the default for agent integrations. - `default_monitoring` (Boolean) Make this output the default for agent monitoring. -- `hosts` (List of String) A list of hosts. - `kafka` (Attributes) Kafka-specific configuration. (see [below for nested schema](#nestedatt--kafka)) - `output_id` (String) Unique identifier of the output. - `space_ids` (Set of String) The Kibana space IDs where this output is available. When set, the output will be created and managed within the specified space. Note: The order of space IDs does not matter as this is a set. diff --git a/internal/fleet/output/schema.go b/internal/fleet/output/schema.go index 1a1e6f9fe..7fc53cf35 100644 --- a/internal/fleet/output/schema.go +++ b/internal/fleet/output/schema.go @@ -60,7 +60,7 @@ func getSchema() schema.Schema { }, "hosts": schema.ListAttribute{ Description: "A list of hosts.", - Optional: true, + Required: true, Validators: []validator.List{ listvalidator.SizeAtLeast(1), }, From 9ea8746038c2e7039625acf7e36d150e8bf2c3f4 Mon Sep 17 00:00:00 2001 From: Toby Brain Date: Mon, 17 Nov 2025 10:14:04 +1100 Subject: [PATCH 3/3] Changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8522e719e..3e0520e94 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ - Add `space_ids` attribute to all Fleet resources to support space-aware Fleet resource management ([#1390](https://github.com/elastic/terraform-provider-elasticstack/pull/1390)) - Add new `elasticstack_elasticsearch_ml_job_state` resource ([#1337](https://github.com/elastic/terraform-provider-elasticstack/pull/1337)) - Add new `elasticstack_elasticsearch_ml_datafeed_state` resource ([#1422](https://github.com/elastic/terraform-provider-elasticstack/pull/1422)) +- Make `hosts` attribute required in `elasticstack_fleet_output` resource ([#1450](https://github.com/elastic/terraform-provider-elasticstack/pull/1450/files)) ## [0.12.1] - 2025-10-22 - Fix regression restricting the characters in an `elasticstack_elasticsearch_role_mapping` `name`. ([#1373](https://github.com/elastic/terraform-provider-elasticstack/pull/1373))