output "frontend_public_ip" {
  description = "L'IP publique de l'instance frontend."
  value       = google_compute_instance.frontend_instance.network_interface[0].access_config[0].nat_ip
}

output "internal_ips" {
  description = "Map des IPs internes de toutes les instances."
  value = {
    frontend = google_compute_instance.frontend_instance.network_interface[0].network_ip
    backend  = google_compute_instance.backend_instance.network_interface[0].network_ip
    database = google_compute_instance.database_instance.network_interface[0].network_ip
  }
}

output "instance_names" {
  description = "Map des noms des instances."
  value = {
    frontend = google_compute_instance.frontend_instance.name
    backend  = google_compute_instance.backend_instance.name
    database = google_compute_instance.database_instance.name
  }
}