{"id":18238234,"url":"https://github.com/elliotsecops/eks-terraform-automated","last_synced_at":"2026-04-29T10:03:05.580Z","repository":{"id":258450552,"uuid":"873873170","full_name":"elliotsecops/EKS-Terraform-Automated","owner":"elliotsecops","description":"This project deploys a Kubernetes cluster on AWS using EKS and Terraform.  ","archived":false,"fork":false,"pushed_at":"2024-10-17T01:58:53.000Z","size":8,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-21T21:03:54.554Z","etag":null,"topics":["aws-eks","aws-eks-cluster","cloud","cloud-deployment","cloud-devops","elastic-kubernetes-service","iac","infra-terraform","infrastructure-as-code","kubernetes","kubernetes-cluster","kubernetes-deployment","terraform","terraform-aws"],"latest_commit_sha":null,"homepage":"","language":"HCL","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/elliotsecops.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-10-16T21:38:25.000Z","updated_at":"2024-10-24T03:24:13.000Z","dependencies_parsed_at":null,"dependency_job_id":"a6620fdf-81a4-4ab9-bdfa-592f6dc9146c","html_url":"https://github.com/elliotsecops/EKS-Terraform-Automated","commit_stats":null,"previous_names":["elliotsecops/eks-terraform-automated"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/elliotsecops/EKS-Terraform-Automated","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elliotsecops%2FEKS-Terraform-Automated","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elliotsecops%2FEKS-Terraform-Automated/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elliotsecops%2FEKS-Terraform-Automated/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elliotsecops%2FEKS-Terraform-Automated/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/elliotsecops","download_url":"https://codeload.github.com/elliotsecops/EKS-Terraform-Automated/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elliotsecops%2FEKS-Terraform-Automated/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261193090,"owners_count":23122904,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["aws-eks","aws-eks-cluster","cloud","cloud-deployment","cloud-devops","elastic-kubernetes-service","iac","infra-terraform","infrastructure-as-code","kubernetes","kubernetes-cluster","kubernetes-deployment","terraform","terraform-aws"],"created_at":"2024-11-05T03:04:30.420Z","updated_at":"2026-04-29T10:03:00.553Z","avatar_url":"https://github.com/elliotsecops.png","language":"HCL","funding_links":[],"categories":[],"sub_categories":[],"readme":"# EKS Project with Terraform\n\nThis project provides a minimalist yet production-ready foundation for deploying an EKS cluster on AWS using Terraform. It includes a VPC, EKS cluster, and worker nodes, and is automated with GitHub Actions for CI/CD.\n\n## Project Structure\n\n- `.github/workflows/main.yml`: GitHub Actions configuration for CI/CD.\n- `main.tf`: Main Terraform configuration.\n- `variables.tf`: Variable definitions.\n- `outputs.tf`: Project outputs.\n- `modules/`: Separate modules for VPC and EKS.\n- `README.md`: Project documentation.\n\n## Modules\n\n### VPC Module\n\n- **Description**: Configures a VPC with public and private subnets.\n- **Variables**:\n  - `vpc_cidr`: CIDR block for the VPC.\n  - `public_subnets`: List of public subnets.\n  - `private_subnets`: List of private subnets.\n\n### EKS Module\n\n- **Description**: Configures an EKS cluster with managed nodes.\n- **Variables**:\n  - `cluster_name`: Name of the EKS cluster.\n  - `vpc_id`: ID of the VPC.\n  - `private_subnets`: Private subnets for the EKS cluster.\n  - `instance_type`: Instance type for the nodes (default `t3.medium`).\n  - `desired_capacity`: Desired number of nodes (default `2`).\n\n## CI/CD\n\nGitHub Actions is used to automate the deployment of the infrastructure and applications.\n\n## Prerequisites\n\nBefore you begin, ensure you have met the following requirements:\n\n- **AWS Account**: You need an AWS account with appropriate permissions to create resources.\n- **AWS CLI**: Installed and configured with your AWS credentials.\n- **Terraform**: Installed on your local machine. This project is compatible with Terraform version 1.3.0 and later.\n- **kubectl**: Installed to interact with your Kubernetes cluster.\n- **GitHub Account**: If you plan to use GitHub Actions for CI/CD.\n\n## Installation\n\n1. **Clone the Repository**:\n   ```bash\n   git clone https://github.com/elliotsecops/eks-terraform.git\n   cd eks-terraform\n   ```\n\n2. **Initialize Terraform**:\n   ```bash\n   terraform init\n   ```\n\n3. **Plan the Deployment**:\n   ```bash\n   terraform plan -var=\"cluster_name=my-production-cluster\"\n   ```\n\n4. **Apply the Deployment**:\n   ```bash\n   terraform apply -var=\"cluster_name=my-production-cluster\"\n   ```\n\n## Configuration\n\n- **AWS Credentials**: Ensure your AWS credentials are configured correctly. You can set them up using the AWS CLI:\n   ```bash\n   aws configure\n   ```\n   Make sure to configure the correct AWS region.\n\n- **Terraform Variables**: Modify the `variables.tf` file or use a `terraform.tfvars` file to set your specific values for variables like `vpc_cidr`, `public_subnets`, etc.\n\n  Example `terraform.tfvars`:\n  ```hcl\n  cluster_name = \"my-dev-cluster\"\n  desired_capacity = 3\n  AWS_REGION = \"us-east-1\"\n  ```\n\n  Apply using the `terraform.tfvars` file:\n  ```bash\n  terraform apply -var-file=terraform.tfvars\n  ```\n\n## Post-Deployment Steps\n\n1. **Verify Cluster**:\n   ```bash\n   kubectl get nodes\n   ```\n\n2. **Deploy Applications**:\n   ```bash\n   kubectl apply -f path/to/your/application.yaml\n   ```\n\n3. **Access the Cluster**:\n   After deployment, you can access the cluster using the following command:\n   ```bash\n   aws eks --region us-east-1 update-kubeconfig --name my-production-cluster\n   ```\n\n   After running this command, ensure your kubectl context is set correctly:\n   ```bash\n   kubectl config use-context arn:aws:eks:us-east-1:123456789012:cluster/my-production-cluster\n   ```\n\n\n## Scaling\n\n- **Auto Scaling**: Configure auto-scaling policies for your EKS cluster to handle varying workloads. Use metrics like CPU and memory to trigger scaling events. Refer to the [AWS Auto Scaling documentation](https://docs.aws.amazon.com/autoscaling/ec2/userguide/what-is-amazon-ec2-auto-scaling.html).\n\n## Security\n\n- **IAM Roles**: Ensure proper IAM roles and policies are in place for your EKS cluster and worker nodes. Refer to the [AWS IAM documentation](https://docs.aws.amazon.com/IAM/latest/UserGuide/introduction.html).\n- **Network Security**: Review and configure security groups and network ACLs. Refer to the [AWS VPC documentation](https://docs.aws.amazon.com/vpc/latest/userguide/what-is-amazon-vpc.html).\n\n## Troubleshooting\n\n- **Common Issues**:\n  - **Deployment Errors**: Check the Terraform logs for detailed error messages.\n  - **Node Joining Issues**: Verify the worker node IAM role and security group configurations.\n  - **Access Issues**: Ensure your AWS CLI is configured correctly and your IAM user has the necessary permissions.\n  - **kubectl Context**: Ensure your kubectl context is set correctly after running `aws eks update-kubeconfig`.\n\n## Contributing\n\nIf you want to contribute to this project, please follow these steps:\n\n1. Fork the repository.\n2. Create a new branch (`git checkout -b feature-branch`).\n3. Make your changes and commit them (`git commit -m 'Add some feature'`).\n4. Push to the branch (`git push origin feature-branch`).\n5. Open a pull request.\n\nPlease follow the coding style guidelines and ensure all tests pass before submitting a pull request.\n\n## License\n\nThis project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.\n\n## Contact\n\nFor questions or support, please contact:\n\n- **Email**: elliotsecops@protonmail.com\n- **GitHub**: [elliotsecops](https://github.com/elliotsecops)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felliotsecops%2Feks-terraform-automated","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Felliotsecops%2Feks-terraform-automated","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felliotsecops%2Feks-terraform-automated/lists"}