Infrastructure components: - VPC with single public subnet (10.0.0.0/16) - Security group (SSH/HTTP/HTTPS from anywhere) - EC2 instance (t3.medium, Ubuntu 24.04, 30GB encrypted gp3) - S3 bucket for backups (versioned, encrypted) - IAM role with S3FullAccess for EC2 - Route 53 DNS (gitea.poll-streams.com → EC2) - Ed25519 SSH key generation via Terraform
41 lines
1.2 KiB
HCL
41 lines
1.2 KiB
HCL
# Outputs
|
|
output "ec2_public_ip" {
|
|
description = "Public IP address of the EC2 instance"
|
|
value = aws_instance.gitea.public_ip
|
|
}
|
|
|
|
output "ec2_instance_id" {
|
|
description = "EC2 instance ID"
|
|
value = aws_instance.gitea.id
|
|
}
|
|
|
|
output "s3_bucket_name" {
|
|
description = "Name of the S3 backup bucket"
|
|
value = aws_s3_bucket.backups.id
|
|
}
|
|
|
|
output "ssh_private_key_path" {
|
|
description = "Path to the SSH private key"
|
|
value = local_file.private_key.filename
|
|
}
|
|
|
|
output "ssh_connection_command" {
|
|
description = "Command to SSH into the EC2 instance"
|
|
value = "ssh -i ${local_file.private_key.filename} -o StrictHostKeyChecking=accept-new ubuntu@${aws_instance.gitea.public_ip}"
|
|
}
|
|
|
|
output "ssh_connection_via_domain" {
|
|
description = "SSH command using domain name (use after DNS propagates)"
|
|
value = "ssh -i ${local_file.private_key.filename} -o StrictHostKeyChecking=accept-new ubuntu@gitea.poll-streams.com"
|
|
}
|
|
|
|
output "gitea_domain" {
|
|
description = "Gitea domain name"
|
|
value = "gitea.poll-streams.com"
|
|
}
|
|
|
|
output "gitea_url" {
|
|
description = "Gitea URL (will be HTTPS after SSL setup)"
|
|
value = "https://gitea.poll-streams.com"
|
|
}
|