qvest-task/terraform/vpc.tf
aviyadeveloper e5069332e5 feat: AWS infrastructure setup with Terraform
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
2026-06-08 17:37:45 +02:00

19 lines
353 B
HCL

# VPC and Networking
module "vpc" {
source = "terraform-aws-modules/vpc/aws"
version = "6.6.1"
name = "${var.project_name}-vpc"
cidr = "10.0.0.0/16"
azs = ["${var.aws_region}a"]
public_subnets = ["10.0.1.0/24"]
enable_dns_hostnames = true
enable_dns_support = true
tags = {
Name = "${var.project_name}-vpc"
}
}