Skip to content

Tamir26/Wiki_JS_Terrafrom

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Wiki.js Terraform Infrastructure on AWS

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.


📐 Architecture Overview

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

Architecture Diagram


🔧 Prerequisites

Before deploying, ensure you have the following tools and permissions.

Tools

IAM Permissions Required

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

🧱 Module Breakdown

VPC Module

  • 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

EKS Module

  • 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

ALB Module

  • 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

PostgreSQL Module

  • 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

🚀 Deployment Instructions

To initialize and deploy the infrastructure:

terraform init -upgrade
terraform validate
terraform plan
terraform apply

Destroy Instructions

terraform destroy

About

WikiJS_Terraform

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages