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)) 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), },