# outputs.tf defines outputs for the module.

output "service" {
  description = "Webapp Cloud Run service resource"
  value       = google_cloud_run_v2_service.webapp
}

output "service_account" {
  description = "Service account which service runs as"
  value       = google_service_account.webapp
}

output "load_balancer" {
  description = "Load balancer for the webapp"
  value       = try(module.webapp_http_load_balancer[0], null)
}

output "static_egress_ip" {
  description = <<EOI
The static egress IP assigned to this cloud run instance. Only populated
if the variable `enable_static_egress_ip` is true.
EOI
  value       = var.enable_static_egress_ip ? google_compute_address.static_ip[0].address : ""
}