output "security_groups" {
  description = "List of security groups in filtered by current region, formatted with account_id prefix."
  value       = local.regional_sg_list
  # You can reference a security group with account id prefix even in the same account and the same VPC.
  precondition {
    condition     = length(local.regional_sg_list) > 0
    error_message = "No security groups were found for the service ${var.service_name} in ${var.environment} in the current region."
  }
}
