Initial commit - realms platform
This commit is contained in:
parent
c590ab6d18
commit
c717c3751c
234 changed files with 74103 additions and 15231 deletions
68
terraform/outputs.tf
Normal file
68
terraform/outputs.tf
Normal file
|
|
@ -0,0 +1,68 @@
|
|||
# =============================================================================
|
||||
# App Server Outputs
|
||||
# =============================================================================
|
||||
|
||||
output "app_droplet_id" {
|
||||
description = "ID of the app server droplet"
|
||||
value = module.app_server.droplet_id
|
||||
}
|
||||
|
||||
output "app_public_ip" {
|
||||
description = "Public IPv4 address of the app server"
|
||||
value = module.app_server.public_ip
|
||||
}
|
||||
|
||||
output "app_private_ip" {
|
||||
description = "Private IPv4 address of the app server (VPC)"
|
||||
value = module.app_server.private_ip
|
||||
}
|
||||
|
||||
output "app_ssh_port" {
|
||||
description = "SSH port for the app server"
|
||||
value = var.app_ssh_port
|
||||
}
|
||||
|
||||
output "app_firewall_id" {
|
||||
description = "ID of the app server firewall"
|
||||
value = module.app_server.firewall_id
|
||||
}
|
||||
|
||||
# =============================================================================
|
||||
# Connection Info
|
||||
# =============================================================================
|
||||
|
||||
output "ssh_config" {
|
||||
description = "SSH config snippet for connecting to the app server"
|
||||
value = <<-EOT
|
||||
# Add to ~/.ssh/config
|
||||
|
||||
# Connect via jump host
|
||||
Host realms-app
|
||||
HostName ${module.app_server.private_ip}
|
||||
Port ${var.app_ssh_port}
|
||||
User root
|
||||
ProxyJump realms-jump
|
||||
IdentityFile ~/.ssh/id_ed25519
|
||||
|
||||
# Or direct connection (if on VPC)
|
||||
Host realms-app-direct
|
||||
HostName ${module.app_server.public_ip}
|
||||
Port ${var.app_ssh_port}
|
||||
User root
|
||||
IdentityFile ~/.ssh/id_ed25519
|
||||
EOT
|
||||
}
|
||||
|
||||
output "deploy_info" {
|
||||
description = "Deployment information for CI/CD"
|
||||
value = <<-EOT
|
||||
App Server Public IP: ${module.app_server.public_ip}
|
||||
App Server Private IP: ${module.app_server.private_ip}
|
||||
SSH Port: ${var.app_ssh_port}
|
||||
Domain: ${var.app_domain}
|
||||
|
||||
Add these to Forgejo secrets:
|
||||
DEPLOY_HOST: ${module.app_server.private_ip}
|
||||
DEPLOY_PORT: ${var.app_ssh_port}
|
||||
EOT
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue