output "namespace" {
  description = "Kubernetes namespace where this service is deployed"
  # If this module created the namespace, read it from the resource; otherwise
  # fall back to the provided namespace variable.
  value       = var.create_namespace ? kubernetes_namespace.this[0].metadata[0].name : var.namespace
}

output "deployment_name" {
  description = "Name of the Kubernetes Deployment for this service"
  value       = kubernetes_deployment.this.metadata[0].name
}

output "service_name" {
  description = "Name of the Kubernetes Service for this service"
  value       = kubernetes_service.this.metadata[0].name
}

output "service_port" {
  description = "Port exposed by the Kubernetes Service"
  value       = var.port
}
