AWS Infrastructure Automation
#
ObjectiveThe objective of this project is to automate the provisioning of AWS infrastructure resources using Terraform. It provides a set of Terraform configuration files that create a VPC, subnet, route table, security group, S3 bucket, and an EC2 instance on AWS.
GitLab Repository URL: AWS Infra Automation Repository
#
Deployment StepsFollow the steps below to deploy the infrastructure using Terraform:
Clone the repository:
Change into the cloned directory:
Update the
main.tf
file: Update themain.tf
file with your AWS credentials, desired region, AMI ID, key pair name, etc. This file contains the Terraform configuration for creating the infrastructure resources.Initialize Terraform:
Review planned changes:
Apply changes:
Terraform will prompt for confirmation before proceeding. Enter
yes
to continue.Infrastructure Destruction (Cleanup): To destroy the created resources and clean up, run:
#
ConfigurationThe main Terraform configuration file main.tf
contains the resource definitions for creating the following resources:
- VPC: Defines the virtual private cloud.
- Subnet: Specifies the subnet within the VPC.
- Route Table: Creates a route table for the VPC.
- Route Table Association: Associates the subnet with the route table.
- Security Group: Defines the inbound and outbound traffic rules.
- S3 Bucket: Creates an S3 bucket with a given name.
- EC2 Instance: Launches an EC2 instance within the specified subnet and security group.
Make sure to update the configuration file with your specific settings and requirements.