Jenkins on AWS

Terraform Repository to deploy a Jenkins server to AWS.

View Codebase »

Provision Jenkins to AWS with this Terraform template. This will create several AWS resources: VPC, EC2s, Security Groups, Subnets, etc.

The Jenkins Controller and a Jenkins Agent will be provisioned on two separate EC2 instances.

Built With

Getting Started

Prerequisites

  1. An AWS account and access to the AWS Management Console
  2. An S3 bucket for Terraform state tracking
  3. AWS CLI
  4. Key Pairs to ssh into the EC2 instances.
  5. Terraform

Usage

This is IaC to manage your CI/CD infrastructure. Once deployed, ensure to consult the documentation, configure Jenkins for your environment, and write a Jenkinsfile under your project repository.

Ensure to sign into the AWS CLI.

aws login

Modify the data sources and resources to match your current environment. See my blog post for an explanation here.

Initalize Terraform, validate the plan to provision the AWS resources, and apply.

terraform init
terraform plan
terraform apply