From e4601c5f45988d53a6020d912e3277d133456016 Mon Sep 17 00:00:00 2001 From: Hubert Cornet Date: Tue, 4 Nov 2025 17:01:10 +0100 Subject: [PATCH] Update outputs.tf --- outputs.tf | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) diff --git a/outputs.tf b/outputs.tf index e69de29..4a94a25 100644 --- a/outputs.tf +++ b/outputs.tf @@ -0,0 +1,52 @@ +# ============================================================================= +# TUNNEL OUTPUTS +# ============================================================================= + +output "tunnel_id" { + description = "ID du tunnel Cloudflare" + value = cloudflare_zero_trust_tunnel_cloudflared.home_tunnel.id +} + +output "tunnel_cname" { + description = "CNAME du tunnel Cloudflare" + value = "${cloudflare_zero_trust_tunnel_cloudflared.home_tunnel.id}.cfargotunnel.com" +} + +output "tunnel_token" { + description = "Token pour l'agent cloudflared (SENSIBLE)" + value = data.cloudflare_zero_trust_tunnel_cloudflared_token.home_tunnel_token.token + sensitive = true +} + +# ============================================================================= +# APPLICATIONS OUTPUTS +# ============================================================================= + +output "applications_urls" { + description = "URLs publiques de toutes les applications" + value = { + for app_name, app_config in var.applications : + app_name => "https://${app_config.subdomain}.${var.cloudflare_zone}" + } +} + +output "applications_dns_records" { + description = "IDs des enregistrements DNS créés" + value = { + for app_name, dns_record in cloudflare_dns_record.applications : + app_name => dns_record.id + } +} + +output "applications_details" { + description = "Détails de toutes les applications configurées" + value = { + for app_name, app_config in var.applications : + app_name => { + public_url = "https://${app_config.subdomain}.${var.cloudflare_zone}" + origin_url = app_config.origin_url + access_enabled = app_config.access_enabled + dns_record_id = cloudflare_dns_record.applications[app_name].id + } + } +} \ No newline at end of file