{"id":20541697,"url":"https://github.com/dantesbytes/ec2_terraform_example","last_synced_at":"2025-10-05T07:38:07.567Z","repository":{"id":223655916,"uuid":"740286355","full_name":"dantesbytes/ec2_terraform_example","owner":"dantesbytes","description":"create an ec2 instance in seconds with terraform","archived":false,"fork":false,"pushed_at":"2024-01-08T03:01:22.000Z","size":1,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-06T04:27:54.647Z","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dantesbytes.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}},"created_at":"2024-01-08T03:00:16.000Z","updated_at":"2024-01-08T03:01:26.000Z","dependencies_parsed_at":"2024-02-21T11:56:52.730Z","dependency_job_id":null,"html_url":"https://github.com/dantesbytes/ec2_terraform_example","commit_stats":null,"previous_names":["dantesbytes/ec2_terraform_example"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/dantesbytes/ec2_terraform_example","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dantesbytes%2Fec2_terraform_example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dantesbytes%2Fec2_terraform_example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dantesbytes%2Fec2_terraform_example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dantesbytes%2Fec2_terraform_example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dantesbytes","download_url":"https://codeload.github.com/dantesbytes/ec2_terraform_example/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dantesbytes%2Fec2_terraform_example/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278425444,"owners_count":25984682,"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-10-05T02:00:06.059Z","response_time":54,"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":[],"created_at":"2024-11-16T01:25:36.064Z","updated_at":"2025-10-05T07:38:07.537Z","avatar_url":"https://github.com/dantesbytes.png","language":"HCL","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Create an EC2 using Terraform\n\n## Steps\ninstall terraform \ninstall aws cli\ncreate a  user and give access to create an ec2\nconfigure cli with aws config and pass in credential detials \ncreate a .ts file \n\n# terraform block\nterraform {\n    required_providers {\n        aws = {\n            source = \"hashicorp/aws\"\n            version = \"~\u003e 2.15\"\n        }\n    }\n}\n\n\nThis block specifies the required providers for the Terraform configuration. In this case, it declares that the AWS provider is required, and the version should be at least 2.15, but less than 3.0.\n\n# Provider \nprovider \"aws\" {\n    region = \"us-east-1\"\n}\n\nThis block configures the AWS provider. It sets the AWS region to \"us-east-1\". You can modify the region based on your AWS environment.\n\n# Resource Block\nresource \"aws_instance\" \"name\" {\n    ami           = \"ami-079db87dc4c10ac91\"\n    instance_type = \"t2.micro\"\n}\n\nThis block defines the AWS EC2 instance resource. The resource type is aws_instance, and it is given the name \"name\" (you can replace \"name\" with a more meaningful identifier).\nami specifies the Amazon Machine Image (AMI) ID to use for the instance. In this example, it's set to \"ami-079db87dc4c10ac91\", which is a specific AMI. You might want to replace this with the AMI ID that suits your needs.\ninstance_type specifies the type of the EC2 instance. In this case, it's set to \"t2.micro\", which is a cost-effective instance type suitable for low to moderate traffic.\n\n# Notes\nNotes\nBefore applying this configuration, ensure that you have AWS credentials configured on your machine.\nRun terraform init to initialize the Terraform configuration.\nRun terraform apply to create the specified AWS resources.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdantesbytes%2Fec2_terraform_example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdantesbytes%2Fec2_terraform_example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdantesbytes%2Fec2_terraform_example/lists"}