{"id":18947624,"url":"https://github.com/yousafkhamza/terraform_installation","last_synced_at":"2025-04-15T23:30:23.844Z","repository":{"id":195965564,"uuid":"403635853","full_name":"yousafkhamza/Terraform_installation","owner":"yousafkhamza","description":"it's a sample bash script for compiling the latest terraform as of now Because if you have tried to install terraform via built-in repo it was old so that's why I just try to automate that latest installation.","archived":false,"fork":false,"pushed_at":"2021-11-02T11:22:20.000Z","size":60,"stargazers_count":4,"open_issues_count":0,"forks_count":3,"subscribers_count":2,"default_branch":"main","last_synced_at":"2023-09-20T19:52:44.475Z","etag":null,"topics":["bash","bash-script","installation","shell-script","terraform"],"latest_commit_sha":null,"homepage":"","language":"Shell","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/yousafkhamza.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}},"created_at":"2021-09-06T13:37:36.000Z","updated_at":"2023-09-20T19:52:50.641Z","dependencies_parsed_at":"2023-09-20T20:13:40.035Z","dependency_job_id":null,"html_url":"https://github.com/yousafkhamza/Terraform_installation","commit_stats":null,"previous_names":["yousafkhamza/terraform_installation"],"tags_count":null,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yousafkhamza%2FTerraform_installation","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yousafkhamza%2FTerraform_installation/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yousafkhamza%2FTerraform_installation/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yousafkhamza%2FTerraform_installation/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yousafkhamza","download_url":"https://codeload.github.com/yousafkhamza/Terraform_installation/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223688710,"owners_count":17186298,"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":["bash","bash-script","installation","shell-script","terraform"],"created_at":"2024-11-08T13:10:41.544Z","updated_at":"2024-11-08T13:10:42.589Z","avatar_url":"https://github.com/yousafkhamza.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Terraform Installation Script (Linux)\n[![Build](https://travis-ci.org/joemccann/dillinger.svg?branch=master)](https://travis-ci.org/joemccann/dillinger)\n\n---\n## Description\nIt's a simple bash script for terraform compilation installation. \nWhat is terraform: Terraform is an open-source infrastructure as code software tool created by HashiCorp. Users define and provide data center infrastructure using a declarative configuration language known as HashiCorp Configuration Language,\n\n----\n## Feature\n- Terraform installation (automated with bash)\n- Compilation (installation method)\n\n----\n## Pre-Requests\n- It's supported for Linux\n\n```sh\n-RedHat-\n\nyum install git -y\nyum install unzip -y\n\n-Debian-\n\nsudo apt install git -y\nsudo apt install unzip -y\n```\n\u003e it depends on your operating system repository\n\n---\n## How to Get\n```\ngit clone https://github.com/yousafkhamza/Terraform_installation.git\ncd Terraform_installation\nchmod +x terraform.sh\n```\n_If you're not intrested to clone the git repo to your machine you can run teh same via curl_\n```\ncurl -Ls https://raw.githubusercontent.com/yousafkhamza/Terraform_installation/main/terraform.sh | bash\n```\n\n----\n## Output Be Like\n_Newly installed server_\n```\n[root@ip-172-31-43-204 ~]# /bin/bash terraform.sh\nTerraform installation begins..........\nDownloading Terraform From Hashicorp .............\nArchive:  /tmp/terraform_1.0.6_linux_amd64.zip\n  inflating: terraform\nTerraform installation successful..........\n\nThe Terraform version is given below......\n-----------\nTerraform v1.0.6\non linux_amd64\n-----------\n```\n_Already installed on your server its shown to be like_\n```\n[root@ip-172-31-0-141 ~]# curl -Ls https://raw.githubusercontent.com/yousafkhamza/Terraform_installation/main/terraform.sh | bash\nTerrform Already Installed On The Server...........\n\nThe Terrform version is given below......\n-----------\nTerraform v1.0.7\non linux_amd64\n-----------\n```\n\n----\n## Behind the Code\n```\n#!/bin/bash\n\n# -----------------------------------------\n# Terraform installation script for Linux\n# -----------------------------------------\n\nfunction terraform_installtion () {\n    echo \"Downloading Terraform From Hashicorp .............\"\n    wget https://releases.hashicorp.com/terraform/1.0.6/terraform_1.0.6_linux_amd64.zip -P /tmp/ \u003e/dev/null 2\u003e\u00261\n    unzip /tmp/terraform_*.zip\n    mv terraform /usr/bin/\n    rm -f /tmp/terraform_*.zip\n}\n\nwhich terraform \u003e/dev/null 2\u003e\u00261\nif [ $? = 0 ]; then\n    echo \"Terraform Already Installed On The Server...........\"; echo \"\"\n    echo \"The Terraform version is given below......\"\n    echo \"-----------\"\n    terraform -v\n    echo \"-----------\"\n    sleep 1\n    exit 1\nelse\n    echo \"Terraform installation begins..........\"\n    sleep 1\n    terraform_installtion\n    echo \"Terraform installation successful..........\"; echo \"\"\n    echo \"The Terraform version is given below......\"\n    echo \"-----------\"\n    terraform -v\n    echo \"-----------\"\n    sleep 1\n    exit 1\nfi\n```\n\n----\n## Conclusion\nit's a sample bash script for compiling the latest terraform as of now Because if you have tried to install terraform via built-in repo it was old so that's why I just try to automate that latest installation. \n\n### ⚙️ Connect with Me \n\n\u003cp align=\"center\"\u003e\n\u003ca href=\"mailto:yousaf.k.hamza@gmail.com\"\u003e\u003cimg src=\"https://img.shields.io/badge/Gmail-D14836?style=for-the-badge\u0026logo=gmail\u0026logoColor=white\"/\u003e\u003c/a\u003e\n\u003ca href=\"https://www.linkedin.com/in/yousafkhamza\"\u003e\u003cimg src=\"https://img.shields.io/badge/LinkedIn-0077B5?style=for-the-badge\u0026logo=linkedin\u0026logoColor=white\"/\u003e\u003c/a\u003e \n\u003ca href=\"https://www.instagram.com/yousafkhamza\"\u003e\u003cimg src=\"https://img.shields.io/badge/Instagram-E4405F?style=for-the-badge\u0026logo=instagram\u0026logoColor=white\"/\u003e\u003c/a\u003e\n\u003ca href=\"https://wa.me/%2B917736720639?text=This%20message%20from%20GitHub.\"\u003e\u003cimg src=\"https://img.shields.io/badge/WhatsApp-25D366?style=for-the-badge\u0026logo=whatsapp\u0026logoColor=white\"/\u003e\u003c/a\u003e\u003cbr /\u003e\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyousafkhamza%2Fterraform_installation","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyousafkhamza%2Fterraform_installation","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyousafkhamza%2Fterraform_installation/lists"}