output "public_ip" {
  description = "Elastic IP of the relay server"
  value       = aws_eip.layover.public_ip
}

output "hostname" {
  description = "DNS hostname of the relay server"
  value       = var.hostname
}

output "ssh_command" {
  description = "SSH into the instance"
  value       = "ssh -i ${var.ssh_private_key_path} ubuntu@${aws_eip.layover.public_ip}"
}

output "test_command" {
  description = "Test the relay"
  value       = "ssh -o ProxyCommand='layover connect %%h:%%p --server ${var.hostname}' user@destination"
}

output "root_password" {
  description = "Randomized root password (for emergency console access)"
  value       = random_password.root.result
  sensitive   = true
}
