79 lines
2.1 KiB
HCL
79 lines
2.1 KiB
HCL
# Output Values for GLAM Infrastructure
|
|
|
|
output "server_ip" {
|
|
description = "Public IPv4 address of the GLAM server"
|
|
value = hcloud_server.glam.ipv4_address
|
|
}
|
|
|
|
output "server_ipv6" {
|
|
description = "Public IPv6 address of the GLAM server"
|
|
value = hcloud_server.glam.ipv6_address
|
|
}
|
|
|
|
output "server_id" {
|
|
description = "Hetzner Cloud server ID"
|
|
value = hcloud_server.glam.id
|
|
}
|
|
|
|
output "server_status" {
|
|
description = "Server status"
|
|
value = hcloud_server.glam.status
|
|
}
|
|
|
|
output "volume_id" {
|
|
description = "Hetzner Cloud volume ID"
|
|
value = hcloud_volume.data.id
|
|
}
|
|
|
|
output "volume_size" {
|
|
description = "Volume size in GB"
|
|
value = hcloud_volume.data.size
|
|
}
|
|
|
|
output "floating_ip" {
|
|
description = "Floating IP address (if enabled)"
|
|
value = var.use_floating_ip ? hcloud_primary_ip.glam[0].ip_address : null
|
|
}
|
|
|
|
output "sparql_endpoint" {
|
|
description = "SPARQL query endpoint URL"
|
|
value = "https://${var.domain}/query"
|
|
}
|
|
|
|
output "sparql_update_endpoint" {
|
|
description = "SPARQL update endpoint URL"
|
|
value = "https://${var.domain}/update"
|
|
}
|
|
|
|
output "graph_store_endpoint" {
|
|
description = "Graph Store Protocol endpoint URL"
|
|
value = "https://${var.domain}/store"
|
|
}
|
|
|
|
output "ssh_command" {
|
|
description = "SSH command to connect to the server"
|
|
value = "ssh root@${hcloud_server.glam.ipv4_address}"
|
|
}
|
|
|
|
output "dns_record" {
|
|
description = "DNS A record to create for the domain"
|
|
value = <<-EOT
|
|
Create the following DNS record:
|
|
|
|
Type: A
|
|
Name: ${split(".", var.domain)[0]}
|
|
Value: ${hcloud_server.glam.ipv4_address}
|
|
TTL: 3600
|
|
EOT
|
|
}
|
|
|
|
output "estimated_monthly_cost" {
|
|
description = "Estimated monthly cost in EUR"
|
|
value = <<-EOT
|
|
Server (${var.server_type}): ~€5.95
|
|
Volume (${var.volume_size_gb}GB): ~€${format("%.2f", var.volume_size_gb * 0.05)}
|
|
Floating IP: ${var.use_floating_ip ? "~€3.00" : "€0.00"}
|
|
─────────────────────
|
|
Total: ~€${format("%.2f", 5.95 + (var.volume_size_gb * 0.05) + (var.use_floating_ip ? 3.0 : 0))}
|
|
EOT
|
|
}
|