From de10460ecd8c1cbe211d3eb0b4a2a0d00cb3c2df Mon Sep 17 00:00:00 2001 From: Jacob Fiola Date: Wed, 2 Jul 2025 14:13:13 -0600 Subject: [PATCH] make license_key optional if fleet_url is provided --- variables.tf | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/variables.tf b/variables.tf index 9800953..3923fa6 100644 --- a/variables.tf +++ b/variables.tf @@ -113,9 +113,15 @@ variable "health_check_http_port" { } variable "license_key" { - description = "Your Corelight sensor license key" - type = string + description = "Your Corelight sensor license key. Optional if fleet_url is configured." sensitive = true + type = string + default = "" + + validation { + condition = var.license_key != "" || var.fleet_url != "" + error_message = "Either license_key must be provided or fleet_url must be configured." + } } variable "community_string" {