Terraform Input Variable (string, number, bool, list, map...) | How to use Terraform Input Variable

  Рет қаралды 39,342

Rahul Wagh

Rahul Wagh

Күн бұрын

Terraform Input Variable (string, number, boo, list, map...) | How to use Terraform Input Variable
▬▬▬▬▬▬ ⭐️ Instruction's Guides ⭐️ ▬▬▬▬▬▬
1. How to use Terraform input variables - jhooq.com/terraform-input-var...
Terraform is OpenSource infrastructure as a code software tool. With the help of Terraform you can provision infrastructure on cloud platform such AWS(aws.amazon.com/), Google Cloud(cloud.google.com/), Azure(azure.microsoft.com/en-us/), DigitalOcean(www.digitalocean.com/), OpenShift(www.openshift.com/) and many more...cloud provider
But before you start working with Terraform you must understand different types of variables provided by the terraform -
1. string - It will hold string values
2. number - It will hold number values
3. bool - It will hold boolean value .i.e. true, false
4. list - It is used for the collection of values. Collection can be of type string, number
5. map - When you need to create key-value pair then need to use map variable type
In this session, we are going to create a sample terraform for each variable type.
▬▬▬▬▬▬ ⭐️ 🕘Timestamps ⭐️ ▬▬▬▬▬▬
0:00 - Intro to Terraform Input Variables
02:02 - What is terraform Input Variables?
02:33 - Terraform Input Variables example
05:18 - Terraform Input variable syntax
06:36 - string variable
07:34 - number variable
11:16 - boolean variable
12:45 - list variable
15:40 - map variable
For more details on Terraform here is the official guide - www.terraform.io/docs/
To learn more on DevOps visit - jhooq.com
Disclaimer/Policy: All the content/instructions are solely mine. The source is completely open-source.
Video is copyrighted and can not be re-distributed on any platform.
#devops #terraform #InfrastructureasCode #cloud

Пікірлер: 63
@forexmeter3900
@forexmeter3900 Жыл бұрын
You explain very well, and you take your time unlike other instructors who rush through the presentation and it's hard to for along. Keep up the good work!
@hirenbhatt9808
@hirenbhatt9808 2 жыл бұрын
GREAT UNDERSTANDING !! MOST RECOMMENDED! I HAVE SHORTLISTED THIS VIDEO OUT OF OTHERS SEEN AROUND MANY!!
@shree9660
@shree9660 3 ай бұрын
Really thanks for making this video.
@RahulWagh
@RahulWagh 3 ай бұрын
So nice of you
@saadjahakayani5020
@saadjahakayani5020 2 жыл бұрын
bohat shukariya Rahul sahab for explaining in easy terms of language
@RahulWagh
@RahulWagh 2 жыл бұрын
You are welcome
@leandrojpg
@leandrojpg Жыл бұрын
What a good heart you have, I didn't know anything and the terraform documentation seems confusing to me you put things the easy way. Thank you, may God give you strength to continue helping us
@RahulWagh
@RahulWagh Жыл бұрын
You're very welcome
@John12685
@John12685 Жыл бұрын
Brilliant job Sir. keep up doing the good work ❣
@VNnimbs
@VNnimbs Жыл бұрын
Thanks a lot Rahul ..... Kudos to ur efforts....!!
@prasadrao4840
@prasadrao4840 Жыл бұрын
outstanding explanation for every step in video, many thanks .
@RahulWagh
@RahulWagh Жыл бұрын
Glad you liked it!
@nilavasen8631
@nilavasen8631 Жыл бұрын
Dear Rahul, really nice training material. Thanks a lot. Can you please develop and upload a new video on a real-life project kind of stuff on TF to AWS , so that we can get a clear e2e idea on how to actually apply TF in practical projects ? Thanks in advance !!
@nagababunalluri5059
@nagababunalluri5059 Жыл бұрын
This is too late to find this channel.very useful content shared thanks bro
@RahulWagh
@RahulWagh Жыл бұрын
So nice of you
@mamtasingh7951
@mamtasingh7951 2 ай бұрын
nice content
@sudheerpetluri
@sudheerpetluri 3 жыл бұрын
Hi Rahul, I am started learning terraform. It's very clear to understand.
@RahulWagh
@RahulWagh 3 жыл бұрын
Glad to hear that, stay tuned there are more to come in upcoming weeks
@happylearningtricks
@happylearningtricks Жыл бұрын
thank you for your valuable content..!!❤
@RahulWagh
@RahulWagh Жыл бұрын
My pleasure 😊
@SivaPrasad-ol1gh
@SivaPrasad-ol1gh 2 ай бұрын
Thank You so much
@RahulWagh
@RahulWagh 2 ай бұрын
Welcome!
@KrishnaRac
@KrishnaRac Жыл бұрын
When you give count=2 how does it takes the ami-id for the instance for 2nd instance.
@DanielWeikert
@DanielWeikert 2 жыл бұрын
Great work thanks for sharing. Any reason you run init each time? 1 time should be enough or not? Do you have a tutorial using terraform for a s3-lambda-glue project? best regards and take care
@RahulWagh
@RahulWagh 2 жыл бұрын
There is no need to run the terraform unit each time, it is absolutely optional. I am planning to prepare terraform lambda project soon
@abbaskp3330
@abbaskp3330 3 жыл бұрын
Thank you so much sir..it's really great work. We are able to grasp each explanation..please keep doing, Terraform with gcp for creating dataset and assigning role to group to that created dataset using Terraform.
@RahulWagh
@RahulWagh 3 жыл бұрын
Keep watching there is more to come
@shawnisamazin
@shawnisamazin 2 жыл бұрын
@@RahulWagh I love this tutorial but I dont understand why you introduced count = length (var.user_names) and var.user_names[count.index]. That got me soooo confused. Could you please clarify? @Rahul Wagh
@allwayspositive8359
@allwayspositive8359 Жыл бұрын
you are hero sir thanks a lot sir your contents are supur
@RahulWagh
@RahulWagh Жыл бұрын
Most welcome
@subhash0609
@subhash0609 2 жыл бұрын
There are some Running Servers in aws which have No IAM Roles. I can list those servers in a file, and from that file can we apply IAM roles by using Terraform.
@RahulWagh
@RahulWagh 2 жыл бұрын
Yeah sure you can do that and add IAM roles
@sumanjaiswal13
@sumanjaiswal13 2 жыл бұрын
Your videos are awesome, it would be great if upload some content on terragrunt also.
@RahulWagh
@RahulWagh 2 жыл бұрын
Will try to prepare something around terragrunt in upcoming weeks
@kirankumarkkk7661
@kirankumarkkk7661 Жыл бұрын
Ty.....sir
@RahulWagh
@RahulWagh Жыл бұрын
You welcome
@devips5102
@devips5102 Жыл бұрын
Excellent sir
@RahulWagh
@RahulWagh Жыл бұрын
Keep watching
@vinaykumarpandey1006
@vinaykumarpandey1006 10 ай бұрын
very nice
@RahulWagh
@RahulWagh 10 ай бұрын
Thanks a lot
@sundeepgarg3502
@sundeepgarg3502 Жыл бұрын
your videos are very good, before this terraform was confusing for me
@RahulWagh
@RahulWagh Жыл бұрын
Glad I could help!
@kumarv6706
@kumarv6706 2 жыл бұрын
How to create different tag names (dev, test) for each ec2 instances with variables?
@RahulWagh
@RahulWagh 2 жыл бұрын
There is tag element inside the terraform ec2 block which you can use it
@johnk1709
@johnk1709 2 жыл бұрын
Super
@RahulWagh
@RahulWagh 2 жыл бұрын
you welcome
@talhamalik1681
@talhamalik1681 3 ай бұрын
watching this TF series in 2024 and thanking to @rahul for your effort for us.
@RahulWagh
@RahulWagh 3 ай бұрын
You’re welcome
@furrysimbha5647
@furrysimbha5647 2 жыл бұрын
The AMI specified in this, is it active AMI that you created in your AWS account? I believe its yes.
@RahulWagh
@RahulWagh 2 жыл бұрын
I think it should be an active AMI on aws
@shivanshusharma20.07
@shivanshusharma20.07 2 ай бұрын
Can you cover more topic of gcp int erraform like aws? like tfvars and ssh in gcp?
@RahulWagh
@RahulWagh 2 ай бұрын
It is on the list
@shivanshusharma20.07
@shivanshusharma20.07 2 ай бұрын
@@RahulWagh Sure sir what is playlist for gcp where all topics are covered?
@sandv2902
@sandv2902 Жыл бұрын
Sir please arrange videos In a sequence and in the link as well
@Hitesh_678
@Hitesh_678 2 жыл бұрын
Hi Rahul, i tried the string using GCp but i get lot of error provider "google" { credentials = file("gcp-account.json") project = "my-project-terraform-351112" region = "europe-west4" zone = "europe-west4-a" } resource "google_compute_instance" "default" { machine_type = var.machine_type" tags = { Name= "Terraform e2-micro" } boot_disk { initialize_params { image = "debian-cloud/debian-9" } } variable "machine_type" { description = "Machine type e2.micro" type = string default = "e2.micro" } network_interface { network = "default" access_config { // Ephemeral IP } } }
@sudheerpetluri
@sudheerpetluri 3 жыл бұрын
Rahul please expain in GCP also.
@RahulWagh
@RahulWagh 3 жыл бұрын
Its already there in the Terraform Part 1 - here is the timestamp for the Google Cloud Platform if you want to learn more - kzbin.info/www/bejne/oHu7Z4Zrf6Z6pqs
@sudheerpetluri
@sudheerpetluri 3 жыл бұрын
@@RahulWagh yes i saw that video
@user-mb7qe6ro9m
@user-mb7qe6ro9m 3 жыл бұрын
but u are still hard coding the instance type in variable section.
@RahulWagh
@RahulWagh 3 жыл бұрын
Well yes the idea of this tutorial to show the variables types, so I just hardcoded the instance type into the variable section. I agree hardcoding is not recommended way but for this tutorial and to keep the things simple i have hard coded the instance type
@korebhagath3976
@korebhagath3976 2 жыл бұрын
Why you use string .why not list
@RahulWagh
@RahulWagh 2 жыл бұрын
It’s up to you what you wanna use string or list.
@kajolbahl872
@kajolbahl872 Жыл бұрын
Not good
ЧУТЬ НЕ УТОНУЛ #shorts
00:27
Паша Осадчий
Рет қаралды 8 МЛН
Who has won ?? 😀 #shortvideo #lizzyisaeva
00:24
Lizzy Isaeva
Рет қаралды 64 МЛН
Looks realistic #tiktok
00:22
Анастасия Тарасова
Рет қаралды 105 МЛН
Double Stacked Pizza @Lionfield @ChefRush
00:33
albert_cancook
Рет қаралды 73 МЛН
Crowdstruck (Windows Outage) - Computerphile
14:42
Computerphile
Рет қаралды 99 М.
Terraform for loop, for_each loop and count - Part 6
15:00
Rahul Wagh
Рет қаралды 44 М.
Input Variables with Terraform and Azure
21:52
Travis Roberts
Рет қаралды 14 М.
8 Terraform Best Practices that will improve your TF workflow immediately
8:57
Learn how to use Terraform variables
9:39
Cobus Bernard
Рет қаралды 24 М.
САМЫЙ ДОРОГОЙ ЧЕХОЛ! В стиле Mac Pro
0:35
Romancev768
Рет қаралды 180 М.
😱Хакер взломал зашифрованный ноутбук.
0:54
Последний Оплот Безопасности
Рет қаралды 981 М.
Samsung laughing on iPhone #techbyakram
0:12
Tech by Akram
Рет қаралды 680 М.