Terraform Locals | How to use Terraform Locals? - Part 4
HTML-код
- Опубликовано: 7 авг 2024
- Terraform Locals | How to use Terraform Locals?
▬▬▬▬▬▬ ⭐️ Instruction's Guides ⭐️ ▬▬▬▬▬▬
1. How to use Terraform locals? - jhooq.com/how-to-use-terrafor...
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
In this session we are going to look on terrafrom locals and how to use it inside your terraform files.
Terraform local can really help you to -
1. Improve your terraform file configuration
2. Terraform local helps you to centralized local varible configuration, so that you can change and update the values at one places.
3. It can be really useful to simplify the complex terrafrom file
▬▬▬▬▬▬ ⭐️ 🕘Timestamps ⭐️ ▬▬▬▬▬▬
0:00 - What is terrafrom Locals
02:22 - How to improve terraform file by using Terraform locals?
03:34 - How to implement terraform locals?
05:14 - Terraform locals demo on AWS
For more details on Terraform here is the official guide - www.terraform.io/docs/languag...
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 Наука
I was looking for tf in Realtime use. And i got it !!.Great videos.Continue your work.
Very well explained!
Great Info!!
this channel is very undervaluated - plenty of pretty good content here
Thanks for the feedback
very well explained Rahul bhai..I have seen many videos earlier as well on Terraform but I find your videos easy to understand. Thanks for putting hard work
So nice of you
Great videos.Continue sir
You welcome
Thanks a lot
What is the difference between normal var declared variables and this locals variable?
I think difference between var n locals is that vars can be assigned using env vars Or tfvars file etc. But locals are defined in the script itself.. Cannot accept assignment from outside
thanks Rahul for your valuable content.
You are welcome
Are there any rule on excessive use of local variables?
Due to the face that variables don' t allow other variables as value, can I use locals to abstract variables and their pass those locals as input of variable in modules?
I like all your videos and this is very good . I am mainly working on Azure and your videos really helps me in understanding core concepts . And I have one doubt , can we import multiple resources at a single time ?
What kind of resources you wanna import in terraform?
Thanks for the quality content
having variables or locals is good in case we want to change only a single value what in case there is a requirement to change 2 values in the tag
example
stage-application-projectname
i dont want to hardcode stage and projectname, just want to set it as per requirement using varibles or locals or anything you suggest it should be something like environment-application-projectname where i can pass the values for environment like stage or dev or prod and any projectname for the projectname .. can you please provide the syntax for the same or guide a bit
Excellent explanation sir
Thanks and welcome
can we set value of locals by command line ??
good explain
Thanks for liking
the same can be achieved with variable block inside main.tf or variables.tf file. then what is the difference this local variables make? please explain.
local variables are useful when you have a multimodule terraform project where you are have already defined some variable inside your variable.tf but you do not want to use same variable in your other module then in that case you are going to need local variables so that their scope is just limited to that particular module
@@RahulWagh gotcha, thanks alot ✅
@@RahulWagh nice video..but would have been nice if you mentioned this important point in the video
Yeah I agree sometimes there are so many thoughts while preparing these type of sessions so it just easy to forget
Great tutorial, do you have a complete udemy course of terraform with gcp and k8s???
Not yet but I am planning to launch the course soon
I am confused between the variable and Local??? Whats the difference between them??? Secondly I am using Local.name without putting any $ sign in start....and its working....so is it mandatory to use $ sign or it can work either way???please help to explain the above 2 queries.....thanks
I think $ is used wen we need to concatenate some string like "mystring" to variable like "${local.staging_env}-mystring". And difference between var n locals is that vars can be assigned using env vars Or tfvars file. But locals are defined in the script itself.. Cannot accept assignment from outside..
how much would you charge, if someone wants private lessons?
It would be really nice to talk it over email
It's hardcoding confusing
Hi droped an email, can you check please..