"Hello World !!!" In Terraform

"Hello World !!!" In Terraform

Prerequisite: If you want to start with Terraform, then the "Hello World" program must be your first choice. To run "Hello World" in Terraform, you need to install VS Code as well as Terraform on your system.

you can check terraform installed or not by using "terraform -v" in your CLI.

Steps: After that, you need to open VS Code and create a folder on a particular drive. After that, you need to create a file with the .tf extension, here I have created a terraform-programs folder and under that I have make a hello-world folder and make first.tf file in it, like below blue bordered part:

image info

Here I have use below code structure ,

block "label"{
   identifier=expression
}

In first.tf write below code:

output hello1{
    value = "hello world"
}

where, output is block name,hello1 is label, value is identifier, expression is "hello world".

In CLI if you type terraform plan you get output like below(before give "terraform plan" command you need to first go to the particular directory)-->

image info

Conclusion: In any language hello world program always motivates you to learn more about those languages. I think you follow this article and learn how to start with terraform.

Thanks for reading. This is just start of my blog journey, more to come. follow me to get more.