Code Monkey home page Code Monkey logo

terraform-quickstart's Introduction

Terraform

Setup Terraform

MacOS

First, install the HashiCorp tap, a repository of all our Homebrew packages.

$ brew tap hashicorp/tap$ brew tap hashicorp/tap

Now, install Terraform with hashicorp/tap/terraform

$ brew install hashicorp/tap/terraform

To update to the latest version of Terraform, first update Homebrew.

$ brew update

Then, run the upgrade command to download and use the latest Terraform version.

$ brew upgrade hashicorp/tap/terraform

To verify Terraform installation

$ terraform -help

Add any subcommand to terraform -help to learn more about what it does and available options.

$ terraform -help plan

To enable auto complete (Bash shell)

$ touch ~/.bashrc
$ terraform -install-autocomplete

Linux

https://learn.hashicorp.com/tutorials/terraform/install-cli

$ sudo apt-get update && sudo apt-get install -y gnupg software-properties-common curl

Add the HashiCorp GPG key.

$ curl -fsSL https://apt.releases.hashicorp.com/gpg | sudo apt-key add -

Add the official HashiCorp Linux repository.

$  sudo apt-add-repository "deb [arch=amd64] https://apt.releases.hashicorp.com $(lsb_release -cs) main"

Update to add the repository, and install the Terraform CLI.

$ sudo apt-get update && sudo apt-get install terraform

Windows (using choclatey)

$ choco install terraform

Test Teraform Locally

Change Directory to examples directory

$ cd examples/1_local-setup-mac-linux

If you are on Mac Start Docker Desktop

$ open -a Docker

Initialize the Terraform

$ terraform init

Apply Terraform IaC

$ terraform apply

Test the 1st Terraform IaC, Write the following URL in your browser

http://localhost:8000

You will see the following Data in the browser

Terraform local setup

If you can see Welcome to NGINX on your browser - then Congrats - Your 1st IaC is working!!!

(c) Copyright MetaArivu. Apache 2.0 License

Authors

  • Deepali Arvind
  • Araf Karsh Hamid

terraform-quickstart's People

Contributors

deepali-arvind avatar arafkarsh avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.