# ============================================================================= # VPC Outputs # ============================================================================= output "vpc_id" { description = "ID of the VPC" value = module.vpc.vpc_id } output "vpc_urn" { description = "URN of the VPC" value = module.vpc.vpc_urn } # ============================================================================= # Jump Host Outputs # ============================================================================= output "jump_host_id" { description = "ID of the jump host droplet" value = module.jump_host.droplet_id } output "jump_host_public_ip" { description = "Public IPv4 address of the jump host" value = module.jump_host.public_ip } output "jump_host_private_ip" { description = "Private IPv4 address of the jump host (VPC)" value = module.jump_host.private_ip } output "jump_host_ssh_port" { description = "SSH port for the jump host" value = var.jump_host_ssh_port } # ============================================================================= # Forgejo Outputs # ============================================================================= output "forgejo_droplet_id" { description = "ID of the Forgejo droplet" value = module.forgejo.droplet_id } output "forgejo_public_ip" { description = "Public IPv4 address of the Forgejo droplet" value = module.forgejo.public_ip } output "forgejo_private_ip" { description = "Private IPv4 address of the Forgejo droplet (VPC)" value = module.forgejo.private_ip } output "forgejo_volume_id" { description = "ID of the Forgejo volume" value = module.forgejo.volume_id } output "forgejo_ssh_port" { description = "System SSH port for Forgejo (VPC only)" value = var.forgejo_ssh_port } output "forgejo_git_ssh_port" { description = "Git SSH port for Forgejo (public)" value = var.forgejo_git_ssh_port } output "forgejo_domain" { description = "Domain name for Forgejo" value = var.forgejo_domain } # ============================================================================= # SSH Key Outputs # ============================================================================= output "deploy_key_fingerprint" { description = "Fingerprint of the deploy key (for Forgejo Actions)" value = module.ssh_keys.deploy_key_fingerprint } output "deploy_private_key" { description = "Private key for Forgejo Actions deployments (store securely!)" value = module.ssh_keys.deploy_private_key sensitive = true } output "internal_public_key" { description = "Public key for internal VPC access (jump host -> internal servers)" value = module.ssh_keys.internal_public_key } # ============================================================================= # Firewall Outputs # ============================================================================= output "jump_host_firewall_id" { description = "ID of the jump host firewall" value = module.firewalls.jump_host_firewall_id } output "forgejo_firewall_id" { description = "ID of the Forgejo firewall" value = module.firewalls.forgejo_firewall_id } # ============================================================================= # Connection Info # ============================================================================= output "ssh_config" { description = "SSH config snippet for connecting to the infrastructure" value = <<-EOT # Add to ~/.ssh/config (Windows: C:\Users\\.ssh\config) Host realms-jump HostName ${module.jump_host.public_ip} Port ${var.jump_host_ssh_port} User root IdentityFile ~/.ssh/id_ed25519 Host realms-forgejo HostName ${module.forgejo.private_ip} Port ${var.forgejo_ssh_port} User root ProxyJump realms-jump IdentityFile ~/.ssh/id_ed25519 EOT } output "dns_record_info" { description = "DNS record to create for Forgejo" value = <<-EOT Create an A record: Name: qbit (for qbit.realms.pub) Value: ${module.forgejo.public_ip} TTL: 300 EOT }