Skip to content

Masum-Osman/aws-terraform

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Terraform AWS Infrastructure

Overview

This project uses Terraform to provision and manage AWS resources. It includes modules for creating a VPC and EC2 instances, making it easy to set up a scalable infrastructure on AWS.

Prerequisites

Before you begin, ensure you have the following installed:

Getting Started

Clone the Repository

git clone https://github.com/Masum-Osman/aws-terraform.git
cd aws-terraform

Configure AWS Credentials

Ensure your AWS credentials are configured. You can do this using the AWS CLI:

aws configure

You will be prompted to enter your AWS Access Key, Secret Key, Region, and Output format.

Directory Structure

aws-terraform/
│
├── envs/
│   ├── dev/
│   │   ├── main.tf         # Entry point for the development environment
│   │   ├── variables.tf    # Variables used in the dev environment
│   │   └── .terraform/      # Terraform provider and backend data
│   │
│   └── production/          # Production environment (if applicable)
│
├── modules/
│   ├── vpc/                 # VPC module
│   │   ├── main.tf
│   │   ├── variables.tf
│   │   └── outputs.tf
│   │
│   └── ec2/                 # EC2 module
│       ├── main.tf
│       ├── variables.tf
│       └── outputs.tf
│
└── README.md                # Project documentation

Usage

  1. Initialize Terraform: Run the following command to initialize the backend and install the required providers.

    terraform init
  2. Plan the Infrastructure: Create an execution plan to see the resources that will be created.

    terraform plan
  3. Apply the Configuration: Deploy the infrastructure to AWS.

    terraform apply
  4. Destroy the Infrastructure: If you want to tear down the resources, run:

    terraform destroy

Variables

You can configure different variables such as instance type and AMI by modifying the variables.tf files located in each environment folder.

Contributing

Contributions are welcome! Please feel free to submit a pull request or open an issue for any enhancements or bug fixes.

License

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

Acknowledgments

Thanks to Terraform and AWS for providing powerful tools to manage infrastructure as code!

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages