{"id":21433037,"url":"https://github.com/randomtask2000/terraform-ec2-instance","last_synced_at":"2026-02-26T10:22:25.513Z","repository":{"id":218614876,"uuid":"162433273","full_name":"randomtask2000/terraform-ec2-instance","owner":"randomtask2000","description":"Simple example of how to provision an EC2 instance with Terraform","archived":false,"fork":false,"pushed_at":"2019-01-22T17:28:00.000Z","size":122,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-23T08:44:11.540Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/randomtask2000.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}},"created_at":"2018-12-19T12:17:56.000Z","updated_at":"2019-02-07T19:29:45.000Z","dependencies_parsed_at":"2024-01-23T01:49:58.309Z","dependency_job_id":null,"html_url":"https://github.com/randomtask2000/terraform-ec2-instance","commit_stats":null,"previous_names":["randomtask2000/terraform-ec2-instance"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/randomtask2000%2Fterraform-ec2-instance","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/randomtask2000%2Fterraform-ec2-instance/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/randomtask2000%2Fterraform-ec2-instance/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/randomtask2000%2Fterraform-ec2-instance/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/randomtask2000","download_url":"https://codeload.github.com/randomtask2000/terraform-ec2-instance/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243945535,"owners_count":20372893,"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":[],"created_at":"2024-11-22T23:24:15.975Z","updated_at":"2025-10-30T01:05:41.260Z","avatar_url":"https://github.com/randomtask2000.png","language":"HCL","readme":"![Terraform AWS Instance](images/photo.jpeg)\n\n# Terraform ec2 instance\nSimple example of how to provision an EC2 instance with Terraform. This repo is used to show how to use AWS CodeBuild as a `Terraform` service [here](https://github.com/randomtask2000/terraform_codebuild_ec2_instance).\n\n## Setup\nCreate a settings file `terraform.auto.tfvars` that will configure access to your `AWS VPC` and let you `ssh` into your `EC2` instance after you're done:\n```\necho \u003c\u003c\u003c EOL\naws_access_key = \"XXXXXXXXXXXXXXXXXXXX\"\naws_secret_key = \"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\"\naws_region = \"us-east-1\"\npublic_key = \"ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQ...rf+M7Q== my@laptop.local\"\nvpc_id = \"vpc-00000000x00x0xxx0\"\nEOL \u003e\u003e terraform.auto.tfvars;\n```\n## Run Terraform\nAfter you're done creating the above file and adding your `aws access key`, `secret` and your `ssh public key`, run the following:\n```\nterraform init\nterraform plan\necho yes | terraform apply\n```\nTo remove the instance you run:\n```\necho yes | terraform destroy\n```\n## Done\nYou're done and have fun!","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frandomtask2000%2Fterraform-ec2-instance","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frandomtask2000%2Fterraform-ec2-instance","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frandomtask2000%2Fterraform-ec2-instance/lists"}