Terraform templates that provision AWS infrastructure for easytrain/applicaion project.
The EC2 instance uses a custom Amazon Machine Image (AMI) which is built with packer. The Github repo for the Packer temaplate can be found at easytrain/packer.
This project is deployed on AWS at Easytrain.live
The Terraform main.tf file provisions the following AWS resources:
-
VPC in the eu-central-1 region
-
Public subnet in the eu-central-1a availability zone
-
Routing table and internet gateway
-
An EC2 instance that runs a custom AMI and a security group
- Security Group ingress/egress rules:
- SSH
- HTTP (required by loadl balancer)
- Port 587 (required to send emails out)
- Security Group ingress/egress rules:
-
Load Balancer
-
Route53 hosted zone
- A record that points to the public IP
- The domain name was purchased through Namecheap.com
- A CA certificate is attached to the load balancer which enables end-to-end encryption of all data sent between clients and the server.
This project requires the following:
- Terraform version >=1.8.5
- AWS provider version ~>5.54.1
- AWS CLI 1.15.58
- A valid AWS Access Key
├── images
│ ├── easytrain.drawio.png
│ └── easytrain-terraform.png
├── LICENSE
├── main.tf
├── outputs.tf
├── README.md
├── user_data.sh
├── variables.tf
└── versions.tf
This project is licensed under the MIT License - see the LICENSE file for details.



