Skip to content

JASG94/AWS_PiHole

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PiHole deployed on AWS EC2

N|Solid

Requirements

In order to use it Terraform v0.13.5 (not tested in other versions) will be needed

Usage

In order to have it deployed:

$ git clone https://github.com/JASG94/AWS_PiHole.git
$ cd AWS_PiHole
$ terraform init

To continue, an AWS account created with SSH Keys and configured in our laptop is required. Also AWS credentials should be configured.

The deployment could be customized by the following variables in variables.tf file:

variable "instance_type" {
  description = "EC2 instance type"
  type        = string
  default     = "t2.micro"
}

variable "key_name" {
  description = "SSH Key AWS name"
  type        = string
  default     = "awskey"
}

variable "ssh_key" {
  description = "SSH Key directory path"
  type        = string
  default     = "/home/javi/ssh_keys/aws.pem"
}

Recommendable to change PiHole admin password which can be found in /files/docker-compose.yml as WEBPASSWORD

Once configured, to proceed with the deployment:

$ terraform apply --autoaprove

This will create:

  • A new Security Group allowing only SSH, HTTP and DNS incoming traffic
  • An EC2 instanci with docker and docker-compose installed and runing pi-hole.

The output will tell us the public IPv4 of our EC2 instance where we can find PiHole running.

About

AWS PiHole Deployment

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages