Skip to content

Terraform Guide

dx edited this page Nov 16, 2025 · 1 revision

Terraform Deployment Guide

This guide explains how to deploy the infrastructure using Terraform.

Prerequisites

  • AWS account and credentials configured (AWS CLI)
  • Terraform installed
  • Ansible, kubectl installed (for later steps)

1. Initialize Terraform

From the repository root:

terraform init

2. Apply Infrastructure

terraform apply

Terraform will provision:

  • VPC, subnets, route tables
  • Internet Gateway
  • Security groups
  • EC2 instances for Jenkins, Nexus, SonarQube
  • Key pairs
  • EKS cluster and managed node group
  • Ansible inventory

3. View Outputs

terraform output

This can include public IPs and EKS kubeconfig data.

4. Destroy Infrastructure

When you are done and want to avoid charges:

terraform destroy

Clone this wiki locally