This project is Part 1 in a series demonstrating infrastructure as code (IaC) using Terraform to provision AWS resources. This first implementation creates a basic EC2 instance with HTTP access, representing the starting point of a DevOps learning journey.
- EC2 Instance: t2.micro instance running Amazon Linux 2023 AMI
- Security Group: Configured to allow HTTP ingress (port 80) and all egress traffic
- Infrastructure as Code: Basic infrastructure defined using Terraform
┌────────────────┐ ┌────────────────────┐
│ │ │ │
│ Internet │◄────►│ EC2 Web Server │
│ │ │ (t2.micro) │
└────────────────┘ └────────────────────┘
│
▼
┌────────────────────┐
│ Security Group │
│ (Port 80 open) │
└────────────────────┘
- Terraform installed
- AWS CLI installed and configured with appropriate credentials
- AWS account with necessary permissions
- Git for version control
Server_1/
├── main.tf # Main Terraform configuration
├── README.md # Project documentation
└── .gitignore # Git ignore file
- Clone the repository:
git clone https://github.com/senopaul/Server_1.git
cd Server_1- Initialize Terraform:
terraform init- Plan the infrastructure:
terraform plan- Apply the configuration:
terraform apply- When finished, destroy the infrastructure to avoid unnecessary charges:
terraform destroy- Verify Security Groups:
terraform state show aws_security_group.web_access - Get EC2 Instance Public IP:
terraform state show aws_instance.Server_1 | grep public_ip - Access the web server: After deployment, you can access the web server via HTTP at the EC2 instance's public IP address
- Basic EC2 Instance: Deploys a t2.micro EC2 instance with Amazon Linux 2023
- HTTP Access: Security group configured to allow HTTP traffic on port 80
- Outbound Traffic: All outbound traffic allowed from the EC2 instance
- AWS Region: Deployed in the us-east-1 region
- Infrastructure as Code: Complete definition of infrastructure using Terraform
- Security Groups: Currently configured to allow only HTTP traffic (port 80)
- Default VPC: Uses the default VPC and its security settings
- AWS Credentials: Uses AWS CLI credentials, no hardcoded secrets in the code
This is Part 1 of a series. Future parts will implement:
- SSH access configuration
- HTTPS support with proper certificates
- Custom VPC with public and private subnets
- Variable definitions for better customization
- Output values for easy reference
- State management with S3 and DynamoDB
- Auto-scaling for high availability
- Monitoring and alerting
- More comprehensive security controls
This project marks the beginning of my DevOps journey, starting with the basics and building toward more complex implementations.
Feel free to reach out for any questions or collaboration opportunities:
- GitHub: @senopaul
⭐️ This project is part 1 of my AWS infrastructure series. Follow for future updates! ⭐️