This repository contains the Terraform code to create two EC2 instances on AWS. The code is structured with separate files for providers, variables, and the main Terraform configuration.
The project is divided into the following main files:
main.tf: The main configuration file where the resources are defined, including the EC2 instances.provider.tf: Defines the AWS provider and the necessary credentials for connecting to your AWS account.variables.tf: Contains variable definitions for the project, such as the instance type, AMI, and region.
Before you begin, ensure that you have the following installed:
- Terraform: Download Terraform
- AWS CLI: Install AWS CLI
You must also configure AWS credentials for Terraform to access your AWS account. You can set up credentials using the AWS CLI:
aws configure