This project delivers a robust, production-ready infrastructure stack for deploying Wiki.js, a modern and open-source wiki engine. Built using Terraform and AWS, it provisions a scalable environment with modular components that prioritize high availability, security, observability, and automation.
Whether you're building an internal knowledge base or exploring Infrastructure as Code best practices, this project offers a clean, extensible foundation aligned with industry standards.
The infrastructure consists of:
- ✅ A Virtual Private Cloud (VPC) with public and private subnets across multiple Availability Zones
- 🐳 An EKS (Elastic Kubernetes Service) cluster to run the Wiki.js containers
- 🌐 An Application Load Balancer (ALB) to expose Wiki.js to the internet
- 🗄️ An RDS PostgreSQL database for persistent data storage
- 📦 Terraform modules designed for reusability and scalability
Before deploying, ensure you have the following tools and permissions.
- Terraform ≥ 1.5.0
- AWS CLI configured with valid credentials
kubectlandaws-iam-authenticator- AWS account with permissions to provision EKS, EC2, RDS, IAM, VPC, and ELB resources
Ensure your user or role has permission to:
- Create and manage VPCs and subnets
- Provision EKS clusters and node groups
- Launch EC2 instances and configure security groups
- Deploy and manage RDS PostgreSQL
- Create and configure Load Balancers
- Source:
terraform-aws-modules/vpc/aws - Purpose: Provisions the base network (VPC, subnets, NAT gateway)
- Features:
- DNS support and hostname resolution
- Public/private subnets across multiple AZs
- Outputs for subnet IDs and VPC metadata
- Source:
terraform-aws-modules/eks/aws - Purpose: Creates the EKS cluster for Wiki.js
- Features:
- Managed node groups with auto-scaling
- IRSA (IAM Roles for Service Accounts)
- Outputs for
kubeconfig, cluster name, and more
- Source:
./modules/alb - Purpose: Deploys an Application Load Balancer to serve Wiki.js
- Features:
- HTTP/HTTPS listeners, target groups, and health checks
- Security groups for internet access
- Source:
./modules/postgresql - Purpose: Deploys an RDS PostgreSQL instance for persistent Wiki.js data
- Features:
- Secure subnet group and dedicated SG
- Outputs: endpoint, database name, SG ID
- Password rotation and performance insights enabled
To initialize and deploy the infrastructure:
terraform init -upgrade
terraform validate
terraform plan
terraform applyterraform destroy