<<<<<<< HEAD
Terraform Week 7 exercises: Provisioning AWS EC2, S3, VPC, and Security Groups with infrastructure as code.
This repository contains my Week 7 of my devOps training (Terraform exercises), demonstrating the provisioning of AWS cloud infrastructure using Terraform.
-
Provision an EC2 Instance
- Launch an EC2 instance in a chosen AWS region.
- Use a valid Linux AMI and instance type
t2.micro. - Add tags:
Name = terraform-web-server,Environment = dev.
-
Create an S3 Bucket for Application Backups
- Create an S3 bucket with a globally unique name.
- Enable versioning for safe backups.
- Add tags:
Name = app-backup-bucket,Owner = Tamcykul. - Output the bucket name after apply.
-
Build a Secure Security Group
- Allow inbound HTTP (port 80) from anywhere.
- Allow inbound SSH (port 22) only from a specific IP.
- Allow all outbound traffic.
- Name the security group
terraform-web-sg.
-
Provision a Simple VPC Network
- Create a VPC with CIDR block
10.0.0.0/16. - Add a public subnet with CIDR
10.0.1.0/24. - Attach an Internet Gateway.
- Create a route table and associate it with the subnet.
- Create a VPC with CIDR block
-
Deploy an EC2 Instance Inside a Custom VPC
- Reuse the custom VPC, subnet, and security group.
- Launch an EC2 instance with a public IP.
- Add tags:
Name = terraform-app-instance. - Output the public IP for easy access.
- Initialize Terraform in each exercise folder:
terraform init
>>>>>>> 3f2a0a5 (Initial commit: Week 7 Terraform project)