{"id":18349257,"url":"https://github.com/pvarentsov/terraform-aws-free-tier","last_synced_at":"2025-04-06T09:31:59.850Z","repository":{"id":46923869,"uuid":"232789565","full_name":"pvarentsov/terraform-aws-free-tier","owner":"pvarentsov","description":"Getting started with the Terraform for managing a base free-tier AWS resources.","archived":false,"fork":false,"pushed_at":"2023-03-01T18:33:21.000Z","size":26,"stargazers_count":56,"open_issues_count":0,"forks_count":35,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-03-21T21:23:00.714Z","etag":null,"topics":["aws","infrastructure-as-code","learning","terraform"],"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/pvarentsov.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}},"created_at":"2020-01-09T11:06:07.000Z","updated_at":"2024-12-25T22:47:06.000Z","dependencies_parsed_at":"2022-09-01T09:01:27.987Z","dependency_job_id":null,"html_url":"https://github.com/pvarentsov/terraform-aws-free-tier","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pvarentsov%2Fterraform-aws-free-tier","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pvarentsov%2Fterraform-aws-free-tier/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pvarentsov%2Fterraform-aws-free-tier/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pvarentsov%2Fterraform-aws-free-tier/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pvarentsov","download_url":"https://codeload.github.com/pvarentsov/terraform-aws-free-tier/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247463745,"owners_count":20942935,"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","infrastructure-as-code","learning","terraform"],"created_at":"2024-11-05T21:21:16.483Z","updated_at":"2025-04-06T09:31:59.452Z","avatar_url":"https://github.com/pvarentsov.png","language":"HCL","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Terraform AWS Free Tier\n\n\u003e Getting started with the Terraform for managing a base free-tier AWS resources.\n\n[![License: MIT](https://img.shields.io/badge/License-MIT-brightgreen.svg)](./LICENSE)\n\n### Project description\n\nThis is a [Terraform](https://www.terraform.io/) project for managing AWS resources. \n\nIt can build the next infrastructure:\n\n* [VPC](https://docs.aws.amazon.com/vpc/latest/userguide/what-is-amazon-vpc.html)\n* Public [Subnet](https://docs.aws.amazon.com/vpc/latest/userguide/working-with-vpcs.html#AddaSubnet) in the `VPC`\n* [IGW](https://docs.aws.amazon.com/vpc/latest/userguide/VPC_Internet_Gateway.html) to enable access to or from the Internet for `VPC`\n* [Route Table](https://docs.aws.amazon.com/vpc/latest/userguide/VPC_Route_Tables.html) to associate `IGW`, `VPC` and `Subnet`\n* [EC2 Instance](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/concepts.html) in the public `Subnet` with the HTTP(s) \u0026 SSH access\n\n### Pre steps\n\n1. [Install Terraform](https://learn.hashicorp.com/terraform/getting-started/install.html)\n2. Create AWS account\n3. If the file `~/.aws/credentials` does't exist, create it and add you Terraform profile to the file. For example:\n   ```text\n   [terraform]\n   aws_access_key_id = Your access key\n   aws_secret_access_key = Your secret access key \n   ```\n4. Create S3 bucket to store Terraform state\n5. Create config file `./src/free-tier/backend/config.tf` that will contain information how to store state in a given bucket. See [example](./src/free-tier/backend/example.config.tf).\n6. Create SSH key pair to connect to EC2 instance:\n   ```bash\n   cd ./src/free-tier/provision/access\n\n   # it creates \"free-tier-ec2-key\" private key and \"free-tier-ec2-key.pub\" public key\n   ssh-keygen -f free-tier-ec2-key\n   ``` \n   \n### Build infrastructure\n\n1. `cd ./src/free-tier`\n2. `terraform init -backend-config=\"./backend/config.tf\"`\n3. `terraform plan`\n4. `terraform apply`\n\n### Post steps\n\nAfter building the infrastructure you can try to connect to you `EC2 instance` via SSH:\n\n1. `cd ./src/free-tier`\n2. `ssh -i ./provision/access/free-tier-ec2-key ubuntu@[EC2 public IP]`\n\nTo check HTTP access you can install `apache2` on your EC2 instance:\n\n1. `sudo apt update \u0026\u0026 sudo apt install apache2` (on EC2 machine)\n2. `sudo service apache2 start` (on EC2 machine) \n3. Check in browser: `http://[EC2 public IP]/`. You can see `Apache2 Default Page` (something like [this](https://annex.exploratorium.edu/))\n\nTo destroy infrastructure:\n\n1. `cd ./src/free-tier`\n2. `terraform destroy`\n\n### Similar projects\n\n* https://github.com/rogeriomm/aws-lab\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpvarentsov%2Fterraform-aws-free-tier","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpvarentsov%2Fterraform-aws-free-tier","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpvarentsov%2Fterraform-aws-free-tier/lists"}