DevOps | Terraform Helloworld on Linux

Photo Of Sri Lanka by Adam Marikar on Unsplash

Install

https://www.terraform.io/downloads.html
chmod +x ./terraform
sudo mv ./terraform /usr/local/bin

Creating First Project

provider “local” { version = “~> 1.4” }
resource “local_file” “hello” {
content = “hello, terraform”
filename = “hello.txt”
}

Init

terraform init

plan

terraform plan

Apply

terraform apply

Verify

Congratulations

configuration drift

echo foo > hello.txt
terraform plan
terraform apply -auto-approve

Core Concepts

variable "myvar" {
type = string
default = "Some Value"
description = "MyVar description"
}
$

--

--

--

Sometimes A software Engineer, sometimes a support engineer, sometimes a devops engineer, sometimes a cloud engineer :D That’s how the this life goes!

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

What we’ve learned while building Fullview

Excel: an ostensibly easy start … and a productivity killer.

The Best Database Management Software 2020

The Best Database Management Software 2020

[Updated] Expanding Sparkies’ Nest: Launching SparkPoint Discord Community Raffle

Creating business value with IoT and big data analytics

Data governance : A good practice framework for data management (Part 1)

The @0xPolygon based game @ChumbiValley has partnered with @RoseonFinance 🌹

Turn it off and back on again! Why restarting a computer fixes issues — SuperTechman

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Nuwan Zen

Nuwan Zen

Sometimes A software Engineer, sometimes a support engineer, sometimes a devops engineer, sometimes a cloud engineer :D That’s how the this life goes!

More from Medium

2min overview of terraform lifecycle

weekly.tf — Issue #69 — Tools for Terraform workflow, tfcmt, compost, trunk, tfnotify…

How to Quickly Improve Your Infrastructure as Code

OCI Terraform Provider for Apple M1