{"id":50445298,"url":"https://github.com/bel7phegor/templates-terraform","last_synced_at":"2026-05-31T21:02:41.795Z","repository":{"id":357776205,"uuid":"1230673084","full_name":"Bel7phegor/templates-terraform","owner":"Bel7phegor","description":"This sample repository is a Terraform-based AWS lab environment for provisioning reusable VPC and EKS infrastructure. It builds a multi-AZ VPC with public/private subnet routing, optional NAT gateway support, an EKS cluster with optional node group or auto mode,...","archived":false,"fork":false,"pushed_at":"2026-05-22T14:59:54.000Z","size":38,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-22T19:56:16.827Z","etag":null,"topics":["aws","aws-eks","devops","infastructure-as-code","terraform","vpc"],"latest_commit_sha":null,"homepage":"","language":"HCL","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Bel7phegor.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-05-06T08:02:14.000Z","updated_at":"2026-05-22T15:00:00.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/Bel7phegor/templates-terraform","commit_stats":null,"previous_names":["bel7phegor/templates-terraform"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Bel7phegor/templates-terraform","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Bel7phegor%2Ftemplates-terraform","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Bel7phegor%2Ftemplates-terraform/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Bel7phegor%2Ftemplates-terraform/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Bel7phegor%2Ftemplates-terraform/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Bel7phegor","download_url":"https://codeload.github.com/Bel7phegor/templates-terraform/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Bel7phegor%2Ftemplates-terraform/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33748607,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-05-31T02:00:06.040Z","response_time":95,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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","aws-eks","devops","infastructure-as-code","terraform","vpc"],"created_at":"2026-05-31T21:02:36.573Z","updated_at":"2026-05-31T21:02:41.790Z","avatar_url":"https://github.com/Bel7phegor.png","language":"HCL","funding_links":[],"categories":[],"sub_categories":[],"readme":"﻿# Terraform AWS VPC and EKS Sample\n\nThis repository contains Terraform configuration to provision an AWS lab environment with reusable networking and EKS infrastructure. The sample deploys a VPC with public and private subnets, optional NAT gateway support, an EKS cluster, an optional node group, and a bastion host for secure cluster access.\n\n## What this project builds\n\n- AWS VPC with a configurable CIDR block\n- Public and private subnets across multiple availability zones\n- Internet Gateway and public route table\n- Optional NAT gateway deployment for private subnet internet access\n- EKS cluster with configurable endpoint access\n- Optional EKS managed node group or EKS auto mode\n- Bastion host with SSH access\n- Security groups for EKS control plane, worker nodes, and bastion\n- Cleanup helper to remove Network Load Balancers during destroy\n\n## Repository layout\n\n- `main.tf` - provider, backend and core configuration\n- `variables.tf` - variable definitions and defaults\n- `local.tf` - computed locals and creation conditions\n- `vpc.tf` - VPC and subnets\n- `igw.tf` - Internet Gateway\n- `nat.tf` - NAT Gateway and Elastic IP\n- `routes.tf` - route tables and associations\n- `sg.tf` - security groups for EKS and bastion\n- `eks.tf` - EKS cluster and access entry\n- `nodegroup.tf` - EKS managed node group\n- `outputs.tf` - exported output values\n- `cleanup.tf` - destroy-time cleanup for NLBs\n- `install-tools.sh` - installation script for ingress and Rancher\n- `setup-tools.sh` - Terraform install helper for Ubuntu\n- `environments/dev/terraform.tfvars` - development variables\n- `environments/prod/terraform.tfvars` - production variables\n- `.gitignore`\n- `README.md`\n\n## Prerequisites\n\n- Terraform 1.3 or later\n- AWS CLI 2 or later\n- AWS credentials configured locally\n- IAM roles already created for EKS cluster, node group, and bastion host\n- S3 backend bucket and DynamoDB lock table available for Terraform state\n\n## Configuration\n\nThe project uses `variables.tf` for defaults and environment files under `environments/` for deployment settings.\n\nUse one of the provided variable files:\n\n```bash\nterraform apply -var-file=environments/dev/terraform.tfvars\nterraform apply -var-file=environments/prod/terraform.tfvars\n```\n\nYou can also override individual values at runtime:\n\n```bash\nterraform apply -var=\"enable_nat_gateway=false\"\n```\n\n## Deployment\n\nInitialize Terraform and apply the configuration:\n\n```bash\nterraform init\nterraform validate\nterraform plan -var-file=environments/dev/terraform.tfvars\nterraform apply -var-file=environments/dev/terraform.tfvars\n```\n\nIf you change backend settings or move environments, update the backend configuration and re-run `terraform init`.\n\n## Destroy\n\nDestroy the deployed infrastructure when it is no longer needed:\n\n```bash\nterraform destroy -var-file=environments/dev/terraform.tfvars\n```\n\n## Post-deployment\n\nThe `install-tools.sh` script can be used after cluster provisioning to install ingress-nginx and Rancher. The `setup-tools.sh` script installs Terraform on Ubuntu.\n\n## Notes\n\n- The sample backend is configured for S3 with DynamoDB locking.\n- `enable_nat_gateway` controls whether NAT gateway resources are created.\n- `single_nat_gateway` controls whether one NAT gateway is shared across AZs or one per AZ.\n- `enable_eks_auto_mode` enables EKS auto mode and disables the managed node group.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbel7phegor%2Ftemplates-terraform","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbel7phegor%2Ftemplates-terraform","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbel7phegor%2Ftemplates-terraform/lists"}