{"id":24849280,"url":"https://github.com/bugbiteme/demo-tform-aws-vpc","last_synced_at":"2025-08-31T03:35:39.875Z","repository":{"id":37950275,"uuid":"344327880","full_name":"bugbiteme/demo-tform-aws-vpc","owner":"bugbiteme","description":"Create custom AWS VCP with gateways, subnets and VMs","archived":false,"fork":false,"pushed_at":"2022-03-20T06:59:50.000Z","size":388,"stargazers_count":50,"open_issues_count":1,"forks_count":146,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-19T19:34:37.516Z","etag":null,"topics":["bastian-ec2","bastion","ec2-instance","ssh-key","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/bugbiteme.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}},"created_at":"2021-03-04T02:40:29.000Z","updated_at":"2024-07-22T16:25:11.000Z","dependencies_parsed_at":"2022-08-08T22:30:55.585Z","dependency_job_id":null,"html_url":"https://github.com/bugbiteme/demo-tform-aws-vpc","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/bugbiteme/demo-tform-aws-vpc","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bugbiteme%2Fdemo-tform-aws-vpc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bugbiteme%2Fdemo-tform-aws-vpc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bugbiteme%2Fdemo-tform-aws-vpc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bugbiteme%2Fdemo-tform-aws-vpc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bugbiteme","download_url":"https://codeload.github.com/bugbiteme/demo-tform-aws-vpc/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bugbiteme%2Fdemo-tform-aws-vpc/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":272935690,"owners_count":25018128,"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","status":"online","status_checked_at":"2025-08-31T02:00:09.071Z","response_time":79,"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":["bastian-ec2","bastion","ec2-instance","ssh-key","vpc"],"created_at":"2025-01-31T12:30:26.440Z","updated_at":"2025-08-31T03:35:39.860Z","avatar_url":"https://github.com/bugbiteme.png","language":"HCL","funding_links":[],"categories":[],"sub_categories":[],"readme":"# AWS VPC Creation with Terraform\nThis project will create a VCP with Internet Gateway, subnets accross 2 AZs: one public\nand one one private.\n\nFrom there terraform will deploy a bastion host in the public subnet in AZ1 and a second host\nin the private subnet in AZ2, which can connect to the internet via a NAT gateway created\nas part of the VPC.\n\nAn SSH key pair is dynamically generated as well, and the private key is copied over to the\nbastion host.\n\nThe ec2 instance in the public subnet is assigned a security group with access from the \nthe intenret via port 22 (for ssh).\n\nThe ec2 instance in the private subnet is assigned to a security group that only allows\nssh access only from connections in the public subnet.\n\nBoth security groups are dynamically created in the network module.\n\n## High level diagram\n\n![Diagram](img/demo-tform-aws-vpc.png)\n\n## Current state\n\nModules:\n\n- ssh-key: Generates an ssh key pair\n- network: Sets up a VPC with IGWs, NAT GWs, 2 public subnets, 2 private subnets, SG to SSH in from anywhere\n- ec2: Currently creates a bastian ec2 instance in a public subnet and a ec2 instance in a private subnet\n- each subnet is in a different AZ\n- private key is copied over to the bastion ec2 instance so it can ssh into the private subnet\n- ec2 in private subnet has outgoing network access though the NAT gateway\n- may add ansible playbook to take care of copying over the shh key to the bastian ec2## Requirements\n\nNo requirements.\n\n## Providers\n\nNo provider.\n\n## Inputs\n\n| Name | Description | Type | Default | Required |\n|------|-------------|------|---------|:--------:|\n| namespace | The project namespace to use for unique resource naming | `string` | `\"LL-TEST\"` | no |\n| region | AWS region | `string` | `\"us-east-1\"` | no |\n\n## Outputs\n\n| Name | Description |\n|------|-------------|\n| private\\_connection\\_string | Copy/Paste/Enter - You are in the private ec2 instance |\n| public\\_connection\\_string | Copy/Paste/Enter - You are in the matrix |\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbugbiteme%2Fdemo-tform-aws-vpc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbugbiteme%2Fdemo-tform-aws-vpc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbugbiteme%2Fdemo-tform-aws-vpc/lists"}