This repository contains Terraform configuration files for deploying a multi-tier infrastructure on AWS as part of CRM112 Assignment 1.
The infrastructure includes:
- A Linux web server (Amazon Linux 2023)
- A Linux B instance (Ubuntu 22.04)
- A MongoDB database server (Ubuntu 22.04)
- A Windows Server instance
- main.tf: Main Terraform configuration defining AWS resources
- ping_test.sh: Script to test connectivity to deployed instances
- windows-password-cloudshell.md: Instructions for retrieving Windows instance password
- install-terraform-cloudshell.txt: Installation instructions for Terraform in AWS CloudShell
- CRM112-Assignment1.pem: Private key for SSH access to Linux instances (in .gitignore)
- .gitignore: Files and patterns to exclude from Git
- Separate security groups for web servers and database
- Database access restricted to web server only
- SSH access enabled for all instances
- RDP access enabled for Windows instance
- ICMP/Ping allowed for all instances
- Ensure you have Terraform installed
- Configure AWS credentials
- Run
terraform initto initialize the working directory - Run
terraform planto preview the deployment - Run
terraform applyto create the infrastructure
Use the ping_test.sh script to verify connectivity to all deployed instances.
When finished, run terraform destroy to remove all resources and avoid ongoing AWS charges.