Wiki.js on AWS EKS Auto Mode

Production-grade knowledge management platform deployed with Terraform, GitHub Actions, and ArgoCD. Nine independent Terraform layers, Parameter Store contract, and secrets in AWS Secrets Manager only.

Project Banner

Content Index

Overview

This repository deploys a production-grade Wiki.js knowledge management platform on Amazon EKS Auto Mode using Infrastructure as Code. The deployment follows a layered architecture with strict separation of concerns: nine independent Terraform layers with isolated state, automated GitHub Actions workflows (OIDC to AWS, no repository secrets), and GitOps delivery via ArgoCD.

Key Technologies

Layer Summary

Apply in order 00 → 01 → … → 50. Destroy in reverse 50 → … → 00.

Key Features

Getting Started

Prerequisites

Deployment Options

Option A - One by one

Run each workflow in order: tf-00-bootstrap-provisiontf-01-dns-main-provision (inputs: deployment_account_role_arn, domain_account_role_arn) → tf-10-network-provision → … → tf-50-app-wikijs-provision. Trigger via Actions → select workflow → Run workflow.

Option B - All in one

Run tf-all-provision once with inputs: env, region, deployment_account_role_arn, domain_account_role_arn. The workflow runs layers 00 → 50 in sequence.

Layer Apply Order

Provision: 00-bootstrap → 01-dns-main → 10-network → 20-eks → 30-data-rds → 35-storage-s3-assets → 40-platform → 45-argocd → 50-app-wikijs.

Destroy: 50-app-wikijs → 45-argocd → … → 01-dns-main → 00-bootstrap. Per-layer destroy requires confirmation string DESTROY-<layer>-<env>-<region>. For tf-all-destroy, use DESTROY-ALL-<env>-<region> once.

RDS has deletion protection by default; disable it before destroying layer 30 (see Teardown).

Architecture

Wiki.js on EKS architecture diagram

Design Drivers

Layer Responsibilities

Layer Scope Responsibility
00-bootstrapDeployment acctState bucket (SSE-KMS), KMS keys, Parameter Store contract
01-dns-mainDomain acct (via assume)DNS IAM role trusted by deployment role
10-networkDeployment acctVPC, subnets, security groups, VPC endpoints
20-eksDeployment acctEKS Auto Mode cluster, OIDC/IRSA
30-data-rdsDeployment acctRDS PostgreSQL, managed master password
35-storage-s3-assetsDeployment acctS3 bucket (SSE-KMS), Wiki.js IRSA role
40-platformDeployment acctNamespaces, Secrets Store CSI, storage, logging
45-argocdDeployment acctArgoCD install (internal by default)
50-app-wikijsDeployment + domain (via assume)ArgoCD Application, ALB ingress, Route 53 A record

Diagrams: Terraform layer dependency, Request and data flows, GitOps delivery flow, Cross-account DNS. Full text: Architecture.

Security Considerations

Summary of the security model (full details in Security considerations):

Documentation

Architecture & plan

Architecture

Scope, design drivers, layer topology, Parameter Store contract

Project plan

Implementation plan, workflow structure, layer-by-layer steps

Naming convention

Resource naming pattern and per-layer variables

Runbooks

Runbooks README

Overview of setup, teardown, prerequisites, and diagram tooling

Prerequisites

AWS resources and copy-paste CLI commands before first deploy

Setup

Layer apply order, provision options, validation, two-apply note for layer 50

Teardown

Destroy order, confirmation patterns, RDS deletion protection

Architecture diagrams

Diagram tooling and specs

PRDs (plan and requirements)

Bootstrap

State bucket, KMS, Parameter Store

DNS main

DNS IAM role in domain account

Network

VPC, subnets, security groups, endpoints

EKS

EKS Auto Mode cluster, OIDC/IRSA

Data RDS

RDS PostgreSQL for Wiki.js

Storage S3 assets

S3 bucket and Wiki.js IRSA role

Platform

Namespaces, CSI, storage, logging

ArgoCD

ArgoCD installation

App Wiki.js

Wiki.js application via ArgoCD, ingress, Route 53

Security

Security considerations

IAM, secrets, network, state, and access control