{"id":18469587,"url":"https://github.com/miteshsharma/basicterraform","last_synced_at":"2025-04-08T10:32:53.678Z","repository":{"id":37445040,"uuid":"146204076","full_name":"MiteshSharma/BasicTerraform","owner":"MiteshSharma","description":"Code which creates a aws EC2 instance using terraform","archived":false,"fork":false,"pushed_at":"2018-08-27T16:15:30.000Z","size":17294,"stargazers_count":3,"open_issues_count":0,"forks_count":9,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-23T11:33:10.414Z","etag":null,"topics":["infrastructure-as-code","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/MiteshSharma.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":"2018-08-26T18:00:58.000Z","updated_at":"2020-06-10T15:14:14.000Z","dependencies_parsed_at":"2022-08-19T17:01:06.535Z","dependency_job_id":null,"html_url":"https://github.com/MiteshSharma/BasicTerraform","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/MiteshSharma%2FBasicTerraform","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MiteshSharma%2FBasicTerraform/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MiteshSharma%2FBasicTerraform/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MiteshSharma%2FBasicTerraform/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MiteshSharma","download_url":"https://codeload.github.com/MiteshSharma/BasicTerraform/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247824277,"owners_count":21002242,"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":["infrastructure-as-code","terraform"],"created_at":"2024-11-06T10:10:59.186Z","updated_at":"2025-04-08T10:32:48.663Z","avatar_url":"https://github.com/MiteshSharma.png","language":"HCL","readme":"# Terraform\nTerraform is one of the tools which can be used for building, changing, versioning our infrastructure safely and efficiently which supports many service providers as well as custom in-house solutions. Infrastructure is defined using high-level configuration languages: HCL and JSON. We are going to use HCL as it is easy to start, is human-readable and editable and is also recommended for terraform.\n\nThe first command to run for a new configuration is **terraform init** which initializes various settings and data, download provider plugin and install in a subdirectory of the current working directory.\n\nOnce we init we want to know what exactly is going to happen on aws infrastructure, this can be done by running command **terraform plan**. Terraform plan is used to create an execution plan which is a way to check whether the set of changes matches our expectation without making any real infrastructure changes.\n\n**terraform apply** command is used to apply the changes required to reach the desired state. Terraform apply scans current directory for the configuration and apply the changes on aws.\n\nOnce we are done with the changes we can run **terraform destroy** to destroy terraform managed infrastructure.\n\n## Steps to run this code:\n\nStep 1: Clone this repository \n\nStep 2: Replace \"ACCESS_KEY_HERE\" with aws access key and \"SECRET_KEY_HERE\" with aws secret key. These keys can be generated from IAM module of aws.\n\nStep 3: Run command \"./terraform init\" or \"terraform init\" to init configuration workspace\n\nStep 4: Run command \"./terraform plan\" or \"terraform plan\" to see output which is going to be executed.\n\nStep 5: Run command \"./terraform apply\" or \"terraform apply\" to actually create EC2 instance\n\nStep 6: Run command \"./terraform destroy\" or \"terraform destroy\" to destroy created EC2 instance. This will only delete instance created through terraform apply.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmiteshsharma%2Fbasicterraform","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmiteshsharma%2Fbasicterraform","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmiteshsharma%2Fbasicterraform/lists"}