Skip to content

Latest commit

 

History

History
88 lines (66 loc) · 3.08 KB

README.md

File metadata and controls

88 lines (66 loc) · 3.08 KB

Terraform Cloud Infrastructure Project

This repository contains the Terraform configurations for a scalable and modular cloud infrastructure on AWS. It's designed to demonstrate how to use Terraform to provision a VPC, subnets, an Application Load Balancer (ALB), and EC2 instances in a structured and reusable manner.

Project Structure

.
├── README.md
├── environments
│   ├── dev
│   │   ├── main.tf
│   │   ├── terraform.tfvars
│   │   └── variables.tf
│   └── prod
│       ├── main.tf
│       ├── terraform.tfvars
│       └── variables.tf
├── modules
│   ├── alb
│   │   ├── main.tf
│   │   ├── outputs.tf
│   │   └── variables.tf
│   ├── ec2
│   │   ├── main.tf
│   │   ├── outputs.tf
│   │   └── variables.tf
│   └── vpc
│       ├── main.tf
│       ├── outputs.tf
│       ├── terraform.tfstate
│       └── variables.tf
└── providers.tf

Features

  • VPC Configuration: Set up a Virtual Private Cloud to securely host your resources.
  • Subnet Creation: Provision public and private subnets to organize resources based on exposure to the public internet.
  • ALB Setup: Deploy an Application Load Balancer to distribute incoming traffic among EC2 instances.
  • EC2 Instances: Launch EC2 instances within your VPC subnets to host your applications.

Prerequisites

  • Terraform installed on your machine.
  • An AWS account and AWS CLI configured with access credentials.

Usage

  1. Initialize Terraform: Navigate to the environment directory you wish to deploy (environments/dev or environments/prod), and run:
terraform init
  1. Review the Plan: Generate an execution plan to see the changes Terraform will perform:
terraform plan
  1. Apply Configuration: Apply the Terraform configuration to provision the resources:
terraform apply

Contributing

Contributions to improve the infrastructure are welcome. Please follow the standard fork and pull request workflow.

License

This project is licensed under the MIT License - see the LICENSE.md file for details.

Acknowledgments

  • This project was inspired by the need to demonstrate best practices in cloud infrastructure provisioning using Terraform.
  • Thanks to the Terraform community for providing extensive documentation and resources.

Notes for Customization:

  • Project Structure: Adjust the project structure diagram if your repository structure differs.
  • Features: Highlight any specific features or modules that your project showcases.
  • Prerequisites: List any specific prerequisites needed to use your project.
  • Usage: Provide detailed instructions on how to use your project, including any setup steps specific to your configurations.
  • Contributing: If you're open to contributions, provide guidelines for contributors.
  • License: Ensure you link to the correct license file and mention the correct license type if it's not MIT.