Day-4 | Terraform State DeepDive | Remote Backend | State Locking

  Рет қаралды 57,896

Abhishek.Veeramalla

Abhishek.Veeramalla

10 ай бұрын

Support my work
www.buymeacoffee.com/abhishekprd Hi Everyone, My Name is Abhishek and my channel is focused on delivering Free content on DevOps and Cloud. Follow my channel for practical learning of DevOps and Cloud. Don't miss the FREE DEVOPS COURSE and FREE AWS COURSE from Playlists section.
Contribute to the channel
topmate.io/abhishek_veeramall...
Doubts Clearing Group
www.youtube.com/@AbhishekVeer...
Instagram: / abhishekveeramalla_off...
GitHub Repo for the Series
github.com/iam-veeramalla/ter...
Book 1:1 with me on TopMate for career guidance
topmate.io/abhishek_veeramalla
Public Telegram Channel For Notes and Updates
t.me/abhishekveeramalla
About me:
========
LinkedIn: / abhishek-veeramalla-77...
GitHub: github.com/iam-veeramalla
Medium: / abhishekveeramalla-av
What is Terraform ?
Learn Terraform from basics
Terraform real world examples
Terraform course
Best terraform course
Terraform modules
Terraform workspaces
#devops #futureofdevops #kubernetes #sre #aws #azure
DEVOPS FAQ
DEVOPS
WHAT IS DEVOPS ?
WHY DEVOPS ?
HOW TO LEARN DEVOPS ?
LEARN DEVOPS IN 60 DAYS ?
NON IT TO IT BACKGROUND ?
IS DEVOPS EASY TO LEARN ?
BEST DEVOPS COURSE
FREE DEVOPS COURSE
#AbhishekVeeramalla
BEST DEVOPS VIDEOS
DEVOPS INTERVIEW QUESTIONS
EASY DEVOPS VIDEOS
BEST WAY TO LEARN DEVOPS
PYTHON FOR DEVOPS
PYTHON PROJECTS FOR DEVOPS
LEARN PYTHON
PYTHON PROJECTS FOR AWS
AWS PYTHON PROJECTS
AWS LAMBDA FUNCTIONS
WHAT IS GITOPS ?
WHY GITOPS ?
LEARN GITOPS ?
GITOPS FREE COURSE
What is AWS ?
LEARN AWS FOR FREE
AWS COURSE
AWS COURSE FOR DEVOPS
AWS CLI Deep Dive .
.
Disclaimer: Unauthorized copying, reproduction, or distribution of this video content, in whole or in part, is strictly prohibited. Any attempt to upload, share, or use this content for commercial or non-commercial purposes without explicit permission from the owner will be subject to legal action. All rights reserved.

Пікірлер: 219
@user-vl8ms3wh3b
@user-vl8ms3wh3b 10 ай бұрын
Hi Bro. Thanks anna for the free courses , i got a good job in one of the MNC company as senior Cloud infrastructure as service role. If every person in IT dedicates some free time for others instead focusing on scraping money from others for time, no one would be jobless. Your initiative is helping others including their dependent families, no other employee would do same as you. Thanks anna.
@AbhishekVeeramalla
@AbhishekVeeramalla 10 ай бұрын
Hearty Congratulations 🎉 .. Wish you all the best.
@MHb789
@MHb789 2 ай бұрын
Did you have any previous experience in IT field?
@nileshsinha957
@nileshsinha957 5 ай бұрын
🎯 Key Takeaways for quick navigation: 01:42 📋 *State file in Terraform is where Terraform records the information of the infrastructure it has created.* 03:29 📋 *State file is important because it helps Terraform update and manage existing infrastructure instead of creating new instances or resources.* 07:36 📋 *Advantages of using the state file include updating existing infrastructure and destroying infrastructure in a controlled manner.* 08:05 📋 *One drawback of the state file is that it records sensitive information, such as passwords, by default.* 09:17 📋 *Storing the state file on a personal laptop or any vulnerable device can compromise the security of sensitive information in the state file.* 10:23 🛡️ *Real-world scenarios involve multiple DevOps engineers collaborating on a Terraform project.* 12:12 🛡️ *Storing the entire Terraform logic, including the state file, in a Version Control System can compromise sensitive information.* 14:31 🛡️ *If the state file is not pushed to the Version Control System, Terraform may not know about updates and can delete the corresponding infrastructure.* 16:35 🛡️ *Using a remote backend solves the drawbacks of storing the state file in a Version Control System.* 19:04 🛡️ *With a remote backend, the state file is automatically updated in the external resource (e.g., S3 bucket) when applying Terraform configurations.* 20:41 🛡️ *Storing the state file in a separate remote backend, such as an S3 bucket, enhances security and prevents sensitive information from being exposed in a Version Control System.* 21:09 🛡️ *Multiple remote backends can be used, such as S3 or Azure storage, depending on the cloud provider being used.* 23:13 🛡️ *With a remote backend workflow, DevOps engineers can clone the GitHub repository, make changes locally, verify them with `terraform apply`, and raise a pull request to update the remote state file stored in the S3 bucket.* 27:30 📂 *Before running `terraform init`, there will be no state file available. After running `terraform apply`, the state file will be created and populated with resource information.* 29:03 📂 *The populated state file contains information about the created resources, such as the instance ID, public and private IP addresses.* 30:46 🛡️ *Storing the state file in a Version Control System is not recommended due to security risks and the potential for forgetting to push updates to the state file.* 31:16 🛡️ *Terraform can show the state file using the `terraform show` command.* 31:29 📂 *Deleting the state file can cause Terraform to lose track of the created resources.* 32:10 🛡️ *Using a remote backend like S3 requires creating a `backend.tf` file with the necessary backend configuration.* 33:24 🛡️ *Copying and pasting backend configuration from the HashiCorp documentation or using extensions can simplify the process.* 35:16 🛡️ *S3 bucket creation can be done manually or with Terraform, ensuring unique bucket names.* 37:02 📂 *The S3 bucket name and region are required in the backend configuration.* 38:38 🛡️ *Initializing the project with the backend configuration will create the S3 bucket.* 40:29 📂 *The state file will be created and stored in the S3 bucket instead of locally.* 41:37 📂 *The state file can be stored in an S3 bucket instead of locally.* 42:09 📂 *Using a remote backend allows storing the state file in S3 and accessing it from there.* 42:38 📏 *Modifying the code no longer requires handling the state file manually.* 44:13 🛡️ *Terraform uses locking mechanism to prevent conflicts when multiple people try to update the same project simultaneously.* 45:22 🛡️ *DynamoDB can be used as a locking mechanism for Terraform projects.* 48:15 🛡️ *Adding the DynamoDB lock details to the backend configuration enables Terraform to handle locking.* Made with HARPA AI
@madhugundarapu
@madhugundarapu 9 ай бұрын
Thank you Abisheek, For spending your valuable time with us. It will really help a lot of people around the globe
@getgoingwithdeepak
@getgoingwithdeepak 4 ай бұрын
Hats-off Abhishek for wonderful explaination and practicals.
@sonurawal1766
@sonurawal1766 10 ай бұрын
Exactly you explain very well like to become zero to hero ☺👍 thanks a lot for such a great inputs and making useful resources... Amazing👍
@AbhishekVeeramalla
@AbhishekVeeramalla 10 ай бұрын
Thank you 😊
@rehanfazal7354
@rehanfazal7354 9 ай бұрын
thanks GURU-JI for teaching these valuable skills
@ashwinichivate3905
@ashwinichivate3905 10 ай бұрын
Gr8 explanation about statefiles and remote backend from end to end.Thanks.
@AbhishekVeeramalla
@AbhishekVeeramalla 10 ай бұрын
Thanks
@awanishaman1612
@awanishaman1612 14 күн бұрын
Thankyou so much #Abhishek for this valuable tutorial for free it's very informative and easy to understand for me, very helpful 👏👍
@sandeepsinghrathore505
@sandeepsinghrathore505 3 ай бұрын
@Abhishek.Veeramalla - Super very clear..
@dideepakindorkar3413
@dideepakindorkar3413 7 күн бұрын
Great sir.. neat and clean explanation.. everyone can understand... Thanks 🙏
@user-kx7dm2nl7q
@user-kx7dm2nl7q 4 ай бұрын
thank uu bro for this seesion very neat explanation and pratical too
@anaramurat733
@anaramurat733 2 ай бұрын
Hi! Thanks for free but very valueble information. I have had many technical interviews. Trust me, almost in every interview they asked about terraform state file. " What is the best managent policy for statefile?" "How to keep secure terraform state file?' etc.... Greatings from US.
@deychand11
@deychand11 2 ай бұрын
Amazon S3, Azure Storage, Google Cloud Storage are the best locations to keep your storage file encrypted. And make sure that you have proper IAM policies in it
@manjeshsno596
@manjeshsno596 10 ай бұрын
Hurray, I was waiting for this video and completed with good understanding Sir..thank you so much for your time.🎉
@AbhishekVeeramalla
@AbhishekVeeramalla 10 ай бұрын
You are most welcome
@msmp4863
@msmp4863 9 ай бұрын
Thank you Abisheek, For spending your valuable time for us. It will really help a lot of peoples in globe
@AbhishekVeeramalla
@AbhishekVeeramalla 9 ай бұрын
It's my pleasure
@Shweta.Gaikwad1966
@Shweta.Gaikwad1966 2 ай бұрын
Thanks for the fantastic video-your clear explanations made everything so easy to understand! 👏
@dileepkumarbandi8066
@dileepkumarbandi8066 10 ай бұрын
Great session Bayya 👌..Previously I had listened terraform from two resources but still lot of confusion on these state and remote backends ...Now everything is crystal clear ...Thanks Bayya
@AbhishekVeeramalla
@AbhishekVeeramalla 10 ай бұрын
Welcome 🙏
@fritzdamiendengambog9169
@fritzdamiendengambog9169 2 ай бұрын
Guys do not forget to always hit the like button. And subscribe. Hi bro @AbhishekVeeramalla greetings from Africa Cameroon
@AbhishekVeeramalla
@AbhishekVeeramalla 2 ай бұрын
😍😍😍
@sainirmalreddygavini2392
@sainirmalreddygavini2392 3 ай бұрын
Really ah wonderful explanation Abhishek , Thankyou much!
@AbhishekVeeramalla
@AbhishekVeeramalla 3 ай бұрын
Most welcome!
@ArchuWikky
@ArchuWikky 10 ай бұрын
Hi Abhishek, At the end of this series, please let us know about the common issues/ frequent issues faced in terraform and interview questions too.
@AbhishekVeeramalla
@AbhishekVeeramalla 10 ай бұрын
For sure
@AbhishekVeeramalla
@AbhishekVeeramalla 10 ай бұрын
Btw already I am covering a lot things.
@ArchuWikky
@ArchuWikky 10 ай бұрын
@@AbhishekVeeramalla 👍 okay
@chukwumaonu7687
@chukwumaonu7687 4 ай бұрын
Bro, you made this look so easy and very cool for interview preparation. Thank you so much
@AbhishekVeeramalla
@AbhishekVeeramalla 4 ай бұрын
You are most welcome
@Pardeep_Sharma999
@Pardeep_Sharma999 10 ай бұрын
Great session ,Thanks Abhishek for your great work
@AbhishekVeeramalla
@AbhishekVeeramalla 10 ай бұрын
Welcome
@ojosamuel3777
@ojosamuel3777 10 ай бұрын
Great Work @Abhishek. really a refresher course for me. Hope you will share with us the case of using Terraform cloud as remote backend
@AbhishekVeeramalla
@AbhishekVeeramalla 10 ай бұрын
Thank you so much 😀
@anilsree06
@anilsree06 9 ай бұрын
Thanks Abhishek!! Able to implement this locking with dynamo db and s3 as remote state backend, It was good hands on practical.
@AbhishekVeeramalla
@AbhishekVeeramalla 9 ай бұрын
Great 👍
@Y.Haritha-ss5jd
@Y.Haritha-ss5jd 4 ай бұрын
Thanks a lot bro i spend lot of money but no one explained the way u did..You are a gem..may god bless you bro ❤
@AbhishekVeeramalla
@AbhishekVeeramalla 4 ай бұрын
😍😍😍
@rakeshkumarnayak8744
@rakeshkumarnayak8744 10 ай бұрын
after seen this video i am first time understood the workflow of statefile and his mechanism.
@rakeshkumarnayak8744
@rakeshkumarnayak8744 10 ай бұрын
Thank you sir.
@AbhishekVeeramalla
@AbhishekVeeramalla 10 ай бұрын
Thank you so much 😀
@devops_jaswanth
@devops_jaswanth 10 ай бұрын
Thanks for the consistency and efforts ❤
@AbhishekVeeramalla
@AbhishekVeeramalla 10 ай бұрын
Welcome
@nyeemTube11
@nyeemTube11 21 күн бұрын
Hello Abhishek thanks for the Zero to Hero Terraform Series. Could you please include a few real-life challenges which could be very beneficial for all people who are learning from you.
@ManojGandham-dw2xy
@ManojGandham-dw2xy 10 ай бұрын
well explained💯
@user-jg9oo9xi6j
@user-jg9oo9xi6j 6 ай бұрын
Excellent 😇
@AtulMisal96
@AtulMisal96 10 ай бұрын
Hi Abhishek Bhaiya.. At the end of this series please make one video on end to end project on terraform like creation of multiple AWS services...
@AbhishekVeeramalla
@AbhishekVeeramalla 10 ай бұрын
For sure
@rekhadevikondeti5764
@rekhadevikondeti5764 9 ай бұрын
Beautifully explained 👏
@AbhishekVeeramalla
@AbhishekVeeramalla 9 ай бұрын
Thank you 🙂
@raghava17
@raghava17 10 ай бұрын
Hi @ Abhishek sir, Great explanation, Actually im azure guy and i watched all the playlists and i implemented same in Azure Cloud , i got expected Results without any issues while implementing things on azure using terraform backends and modules and with using variables , by saying Thank's is very small word for the wonderful content you delivered 😍✌ 🎉🎉 I'm very happy while implementing same things on Azure by getting expected Results with out Any Errors 🤩🤩🤩,,, Thanks a lot sir 🥳🥳🥳
@dileepkumarbandi8066
@dileepkumarbandi8066 10 ай бұрын
@raghava17 bro do u have any real time azure ci-cd projects ?
@AbhishekVeeramalla
@AbhishekVeeramalla 10 ай бұрын
Thanks a lot
@adarshjha__1
@adarshjha__1 10 ай бұрын
Day 4, lesss gooo! 🙌🔥
@AbhishekVeeramalla
@AbhishekVeeramalla 10 ай бұрын
Thanks
@mohankumarr1432
@mohankumarr1432 10 ай бұрын
Thank you so much Abhishek ❤😊
@AbhishekVeeramalla
@AbhishekVeeramalla 10 ай бұрын
Thank you so much 😀
@ravindraravi7435
@ravindraravi7435 5 ай бұрын
Thank you ^^
@howtotelevision
@howtotelevision 10 ай бұрын
❤ love it
@AbhishekVeeramalla
@AbhishekVeeramalla 10 ай бұрын
Thanks
@ashishpandey8766
@ashishpandey8766 10 ай бұрын
Thanks Abhishek
@AbhishekVeeramalla
@AbhishekVeeramalla 10 ай бұрын
Most welcome
@shubhamkalekar1519
@shubhamkalekar1519 10 ай бұрын
Hi abhishek Thanks for your all effort, in real time how the resources will create , whether applying infrastructure using apply command or they use pipeline for infra creation.... If yes then which case we need to create pipeline ams
@sthitaprangyachhatoi4967
@sthitaprangyachhatoi4967 10 ай бұрын
Hey Abhishek, Please consider creating one Production kind of eks cluster setup using terraform and using all the concepts we are learning in this series.. That would be really helpful to get idea on where to use what i believe.
@AbhishekVeeramalla
@AbhishekVeeramalla 10 ай бұрын
will try
@PY-D
@PY-D 7 ай бұрын
Good idea.
@aishwaryap.s.v.s7387
@aishwaryap.s.v.s7387 4 ай бұрын
hi annaya !!! actually i paid for courses but ur courses are more than those courses .i watched terraform in one stretch and understood the concepts!!! thanks anna for ur help!!!
@AbhishekVeeramalla
@AbhishekVeeramalla 4 ай бұрын
All the best
@tuonimihart2009
@tuonimihart2009 8 ай бұрын
youre a great teacher
@AbhishekVeeramalla
@AbhishekVeeramalla 8 ай бұрын
Thanks a lot !!
@sagarahire-ys3uj
@sagarahire-ys3uj 9 ай бұрын
Amazing content as always...forget ppl who r preparing for interviews even working devops ppl are also learning from ur videos that much of relevance is there in ur teaching...i have one question...what is the default behaviour of terraform when we dont create dynamodb table and state lock? how the situation is different before applying dynamodb state lock configuration and aftermath of it?
@MyGiri123
@MyGiri123 9 ай бұрын
Can you please explain what happens internally when we issue terraform init command ?
@mayurichikne526
@mayurichikne526 10 ай бұрын
Hi sir, one request... By the end of series... Plz make full project of how to create real-time used vpc ,subnet in Aws infra using tf.. Thanks in advance
@AbhishekVeeramalla
@AbhishekVeeramalla 10 ай бұрын
sure, will try
@Jalal921
@Jalal921 8 ай бұрын
Very good explanation Abhi
@AbhishekVeeramalla
@AbhishekVeeramalla 8 ай бұрын
Thanks a lot
@mahendrapalla1373
@mahendrapalla1373 10 ай бұрын
Hi @abhishek, The way you explaining the content is really good and must appreciate. at the END of this terraform course, are you going to provide video to set-up production ready EKS cluster in AWS for our understandings ? Thank you, Mahendra.
@AbhishekVeeramalla
@AbhishekVeeramalla 10 ай бұрын
Sure, I will try my best
@agun21st
@agun21st 9 ай бұрын
I am going to master in Terraform by you sir. 😇
@AbhishekVeeramalla
@AbhishekVeeramalla 9 ай бұрын
😍
@karthikkumar4233
@karthikkumar4233 6 ай бұрын
Hi Anna, for dynamodb_table why did you use this step--> billing_mode = “PAY PER REQUEST”? If it is mandatory step how does this help in cost optimization?
@ravitejadarla3882
@ravitejadarla3882 10 ай бұрын
Hi Abhishek, I request you to make an in-depth video on the Kubernetes cluster step-up on the Ubuntu ec2 Instance there is no proper video on KZfaq.
@vikramkamble5330
@vikramkamble5330 10 ай бұрын
Best man for devops🙌
@AbhishekVeeramalla
@AbhishekVeeramalla 10 ай бұрын
😍
@veeru2310
@veeru2310 10 ай бұрын
🎉🎉🎉wow
@AbhishekVeeramalla
@AbhishekVeeramalla 10 ай бұрын
Thanks
@singhbrozz1996
@singhbrozz1996 6 ай бұрын
awesome explainnation 😊 . can we store state file in database?
@entertainment_show9597
@entertainment_show9597 6 ай бұрын
Hi Abhishek sir, is it possible to use another database resource for the locking system instead of DynamoDB? Or is DynamoDB the best option for the locking system?
@ghareeshkumar
@ghareeshkumar 8 ай бұрын
Hi Abhishek, Is subnet ID and ami should be belonga to same 'EC2 instance'?
@prasadreddy8360
@prasadreddy8360 10 ай бұрын
Super sir
@AbhishekVeeramalla
@AbhishekVeeramalla 10 ай бұрын
Thanks
@ketanmorey1953
@ketanmorey1953 10 ай бұрын
very good series Abhishek sir❤ if we are following this to stored state file in s3 and locked it with dynamodb, if new member of terraform team wants to access state file , then how he access it.. please explain this sir.. Thank you🙏
@PremKumar-co5ym
@PremKumar-co5ym 10 ай бұрын
Hi @ Abhishek sir At end of the series plz give some interview questions and answers.
@AbhishekVeeramalla
@AbhishekVeeramalla 10 ай бұрын
sure
@BharathKumarReddy2103
@BharathKumarReddy2103 10 ай бұрын
❤❤❤
@AbhishekVeeramalla
@AbhishekVeeramalla 10 ай бұрын
Thanks
@handsomevillian
@handsomevillian 23 күн бұрын
Hello Sir, Can we configure NFS mount as a remote backend?
@sasmitamallia6960
@sasmitamallia6960 4 ай бұрын
what to do if we have to download the Huge size State file that is present in S3 or Azure Storage Account ? apart from downloading manually from bucket ? Do we have any other options?
@devopsTox-bb2cr
@devopsTox-bb2cr 4 ай бұрын
Hi, As the state file contains sensitive data and it will be in s3. What about the file providers.tf which contains aws_secret and aws_key ? How can I secure it ? Can I create it and after the first terraform apply command, delete it ?
@pritamburnwal6706
@pritamburnwal6706 Ай бұрын
Hi Abhishek, Thanks for the amazing videos of terraform. I am learning a lot with that. at the time stamp of 19:50, the solution for the second issue with local state file I got that, but can you explain a little bit more what exactly the problem is. I got little confused with that issue.
@rrk7488
@rrk7488 10 ай бұрын
if i delete state file, instance remains or not in AWS console
@nehaverma-xn3ed
@nehaverma-xn3ed Ай бұрын
Hi, Great video and explanation, one quick question is it good to have aws s3 configuration and resource information in same repo ?? beacause while destroying it was giving error and it should not delete s3 bucket as it consist state file.
@navneetb1231
@navneetb1231 3 ай бұрын
When i used terraform with bitbucket, when i pushed my branch to remote repo then i didnt need to separately edit and push the statefile…. Am i missing something?
@nick-sx2zn
@nick-sx2zn 2 ай бұрын
is there any mechanism to execute the resources and files order wise, instead of deleting the state file multiple times
@deepakteja9875
@deepakteja9875 4 ай бұрын
bro do one video on postgresql state locking
@shaikasif4093
@shaikasif4093 10 ай бұрын
Hi Abhishek Anna. What happened in remote backend and Locking mechanism. If some one pull the terraform config file and made some changes. And without terraform apply he was push the updated terraform config file to Github then how tfstate file will track the changes.
@AbhishekVeeramalla
@AbhishekVeeramalla 10 ай бұрын
It will not .. thats why we use remote backend. Explained in the video , pls check
@SurajM-qs3wx
@SurajM-qs3wx 6 ай бұрын
instead of Dynamo db can we use Mysql??
@light-sg5sl
@light-sg5sl 9 ай бұрын
Sir, where did I make mistake please tell 49:00 I created first main.tf with dynamodb table then I updated in backend.tf but got the same error
@kittubhai4799
@kittubhai4799 26 күн бұрын
Hai Abhishek small question For ami id and subnet id we have see aws UI only, without opening can't we do ??
@Tavkaur1111
@Tavkaur1111 7 ай бұрын
Sir do we need to have coding (development)knowledge for devops role?
@manid2900
@manid2900 10 ай бұрын
Hi Anna...today are you posting the day-5 vedio?
@AbhishekVeeramalla
@AbhishekVeeramalla 10 ай бұрын
Its already uploaded
@chowdarybvsn
@chowdarybvsn 10 ай бұрын
In real time, are we using terraform for complete setup in AWS? or only for major resources creation only?
@AbhishekVeeramalla
@AbhishekVeeramalla 10 ай бұрын
Complete
@proplusgaming3361
@proplusgaming3361 5 ай бұрын
00:06 Terraform state file and backend 02:43 Using the State file in Terraform 07:36 Advantages and disadvantages of using the state file in Terraform. 10:07 Sensitive information in state files and potential risks 14:59 Using remote backend in terraform to fix the drawbacks of state files 17:19 Store terraform state file in S3 bucket for security and easy access 21:37 Explaining the workflow of updating AWS resources using Terraform in interviews 23:55 Configuring Terraform and AWS in Code Spaces environment 28:12 Executing the terraform apply command creates a state file and updates it with the resources being created. 30:19 Creating a Version Control System-supported project in Terraform 34:35 To create a bucket in AWS S3, you can use Terraform or create it manually. 36:45 Create a unique AWS S3 bucket for Terraform 41:37 Terraform project modified to store state file on S3 bucket 43:48 To avoid conflicts in the terraform project, locking mechanism is important 47:58 Implement backend mechanism with DynamoDB locking. 50:05 This is a simple code that can be executed with the help of documentation and the visual studio extension.
@pavithrang6760
@pavithrang6760 7 ай бұрын
Thanks for ur video bro. It helps me a lot to understand about terraform state file. Actually I've one doubt in backend.tf file. When I configure backend in terraform, state file successfully moved to s3 bucket but in terraform file terraform.tfstate.backup file is now created which holds all information about resource. How do I remove this file? Plz provide some tips.
@gajananwali9705
@gajananwali9705 7 ай бұрын
Did hands-on on this. And at last tried deleting all resources. But it is showing as destroy complete. But I can see ec2 instance and S3 bucket still running. May I know why
@AbhishekVeeramalla
@AbhishekVeeramalla 7 ай бұрын
It should not be the case. Please check your state file. Everything thats in statefile will be deleted
@charansai9891
@charansai9891 8 ай бұрын
Hi Abhishek. Initially you have created S3 bucket and later we deleted statefile. then again we tried to create S3 bucket with same name and configuration with out state file. and we used remote backend to store state file in S3. But if we use same name and configuration which already used we'll get error right. stating Resource already exists. Can you explain on this.
@m2abhishek836
@m2abhishek836 7 ай бұрын
That's correct, he also got the error. See 41:58. But he immediately "clear"ed the screen to escape it. Sometimes these things happens.😀
@umashanker3244
@umashanker3244 10 ай бұрын
Hi Abhishek please make interview questions on all devops tools and AWS cloud
@AbhishekVeeramalla
@AbhishekVeeramalla 10 ай бұрын
Sure
@umashanker3244
@umashanker3244 10 ай бұрын
Hearty Congratulations Abhishek for your newyork poster
@handsomevillian
@handsomevillian 23 күн бұрын
sir my terraform project create resources on AWS cloud but couldn't delete or wipe out it by running the command "terraform destroy". please guide me sir.
@ravipanavi
@ravipanavi 9 ай бұрын
Hi abhi, If we are required to work with multiple people will work the same project, then what is the option.
@AbhishekVeeramalla
@AbhishekVeeramalla 9 ай бұрын
Thats why you store terraform files in git
@ashwinswain1649
@ashwinswain1649 10 ай бұрын
Hi Abhishek, The lock file is pushed to remote n not on local only so it will be able to use lock mechanism if simultaneously t-apply is done? Also in our project we use terragrunt and the explanation is given by the architect on his LinkedIn post i wish you code read n explain it to me in simple words..i cant paste screenshot here but he has written about backend cant be modified without init and that terragrunt allows module level statefile
@yoshitamahajan353
@yoshitamahajan353 6 ай бұрын
Even if we store in git hub repo and forget to push statefile.. cant we always fire terraform refresh command once before starting any changes.. then there wont be any negative side of using statefile in git? Am i right?
@AbhishekVeeramalla
@AbhishekVeeramalla 6 ай бұрын
How about the sensitive information in the statefile ?
@kodjoviamedimele3066
@kodjoviamedimele3066 10 ай бұрын
First to comment. Thanks sir
@AbhishekVeeramalla
@AbhishekVeeramalla 10 ай бұрын
Welcome
@pjj7466
@pjj7466 5 ай бұрын
Bro developers can also see the state file? which is stored in s3bucket using terraform show command?
@pjj7466
@pjj7466 5 ай бұрын
By restricting the s3 bucket access to develops IAM profile we should restrict to show the tf state file na bro?
@nyeemTube11
@nyeemTube11 21 күн бұрын
Also anyone could suggest about the s3 bucket and dynamo DB table deletion steps as well
@vasu-if3de
@vasu-if3de Ай бұрын
Hi Abhiske, I hvae few doubts on terraform 1. how can we give the IAM policy to the S3 and instances 2. Can you please explain the how can we create the VPC, Subnets with CIDR . CAN YOU MAKE A VIDEO .
@durgaganesh311
@durgaganesh311 3 ай бұрын
Hello abhishek ! As we are deleting the state file on the first apply then how we can destroy the created s3 and dynamodb without statefile? and the second doubt is there are two instances are creating rather than one ...can you please explain ?😔
@brownpanther5280
@brownpanther5280 3 ай бұрын
When we moved state file to S3 and linked locked file to Dyanamo DB , my assumption was .terraform.lock.hcl shouldn't be created in local as locking is taken care by Dynamodb (Like the way i dont see state file ln local ) . However , I do see lock file in local . I created new folder and tried doing same , still lock file is getting created in local . -- Can you help understand this ?Im i missing something?
@adityadhopade7727
@adityadhopade7727 10 ай бұрын
Hi abhi , what happens if someone unexpectedly terminates the terraform command while terraform apply and next time when it runs the state it gives is alreeady locked, apart from adding the argument terraform apply -lock=false is there any other option to reset the lock on the terraform ? I had faced this earlier thats why I asked.
@AbhishekVeeramalla
@AbhishekVeeramalla 10 ай бұрын
if apply is hung, then u need to kill that terraform process but if someone abruptly terminates the command, Yup, no other way .. you need force unlock ..
@adityadhopade7727
@adityadhopade7727 10 ай бұрын
​@@AbhishekVeeramallaI also thought so ! Thanks for quick reply through!
@SriGowthamNallasamy
@SriGowthamNallasamy 7 ай бұрын
Hi Abhishek - If we are using the remote back-end also the terraform show command reveals the contents of the state file . How can we secure it in this scenario
@AbhishekVeeramalla
@AbhishekVeeramalla 7 ай бұрын
Thats where your IAM policy comes in to picture. You can also use S3 bucket policies
@SriGowthamNallasamy
@SriGowthamNallasamy 7 ай бұрын
@@AbhishekVeeramalla Thank You Abhishek ❤️🙏
@feeroz4u
@feeroz4u 9 ай бұрын
Question - How does the ".tfstate" file in the S3 bucket get updated in these cases: 1) Another developer raised and got his PR merged without doing 'terraform apply'. 2) Another developer did 'apply' the code, then ran 'terraform destroy', and then got his PR merged.
@AmrutaWagh-kb3yv
@AmrutaWagh-kb3yv 10 ай бұрын
and how to unlock the file please mention sir
@user-tt1jz1vz3r
@user-tt1jz1vz3r 9 ай бұрын
HI Abhishek when you delete the state file after applying, then the instance will be running in the AWS console right, so do we need to delete it manually. Is it only the EC2 instance that we need to delete manually, or anything else required to delete manually. could you please let me know
@AbhishekVeeramalla
@AbhishekVeeramalla 9 ай бұрын
terraform destroy before deleting the statefile. Else u need to delete manually.
@Maharaja98Cubic
@Maharaja98Cubic 5 ай бұрын
Hi Abhishek, your content and method of teaching is good and i personally like that style, so thank you. I have one questions on Remote Backend, what if there are two Devops person access the same file at the same time and during update there could be a chance that second person could miss the update or over ride first persons changes. Is that possible and if YES then what is the solution?
@AbhishekVeeramalla
@AbhishekVeeramalla 5 ай бұрын
You can implement the locking using state locking. DymamoDB can be used for that
@Jay-yu4yv
@Jay-yu4yv Ай бұрын
As the other engineers make new changes, statefile will keep on updating. We can enable s3 versioning and can revert back if someone has made some incorrect configurations with the infra. Am I right @Abhishek.Veeramalla??
@rengaraj98
@rengaraj98 10 ай бұрын
Hi Abhishek, Kind request. Please answer the below common question which i encountered in most of interviews. We have created the AWS resource for ex an ec2 instance through terraform, and then the state file gets deleted. If we reapply the same terraform code for recreating the ec2 instance. what will happen, will the ec2 instance will be created or not or there will be any errors.
@AbhishekVeeramalla
@AbhishekVeeramalla 10 ай бұрын
I did the same thing in the video. Please check
@rengaraj98
@rengaraj98 10 ай бұрын
Thanks for the reply@@AbhishekVeeramalla from the video you have explained, like if state file is not there and we create the resource again with minor change it will recreate the whole resource from scratch. But what happens when state file is not there and we re apply the same code without any change. My understanding is that it will create the resource with different ID, Is that correct? please clarify?
@lingrajbiradar4416
@lingrajbiradar4416 10 ай бұрын
yes, it will create the resource with diff ID@@rengaraj98
@pallerajani3281
@pallerajani3281 10 ай бұрын
Abhishek bro you make a next video. and take a one project and deploy the multiple environments please bro...i have to request bro
@AbhishekVeeramalla
@AbhishekVeeramalla 10 ай бұрын
Pls check the course syllabus.. lets go step by step
@pallerajani3281
@pallerajani3281 10 ай бұрын
I know bro but iam just asked......
@sparun1607
@sparun1607 9 ай бұрын
As suggested by terraform, can we go with option suggested ? will solve if we miss configured ? Initializing the backend... Error: Backend configuration changed A change in the backend configuration has been detected, which may require migrating existing state. 1. If you wish to attempt automatic migration of the state, use "terraform init -migrate -state" 2. If you wish to store the current configuration with no changes to the state, use "terraform init -reconfigure".
@aayushisoni3436
@aayushisoni3436 9 ай бұрын
Once you told in this video that terraform.tfstate file is only created when we paas terrraform apply command then after some time when tou ran terraform plan then also terraform.tfstate created. Xan u explain plz.
@AbhishekVeeramalla
@AbhishekVeeramalla 9 ай бұрын
It is an empty statefile
@aayushisoni3436
@aayushisoni3436 9 ай бұрын
​@@AbhishekVeeramallayou mean so only during apply this tfstate file generated else it generates a empty file??
Heartwarming moment as priest rescues ceremony with kindness #shorts
00:33
Fabiosa Best Lifehacks
Рет қаралды 38 МЛН
I Can't Believe We Did This...
00:38
Stokes Twins
Рет қаралды 133 МЛН
ЧУТЬ НЕ УТОНУЛ #shorts
00:27
Паша Осадчий
Рет қаралды 9 МЛН
Spot The Fake Animal For $10,000
00:40
MrBeast
Рет қаралды 142 МЛН
How I would Learn DevOps from scratch (if I could start over)
15:15
8 Terraform Best Practices that will improve your TF workflow immediately
8:57
Day-24 | TERRAFORM WITH AWS PROJECT  | @cloudchamp  | AWS REAL TIME PROJECT #aws
1:27:23
La emociones de Bluey #歌ってみた #bluey #burrikiki
0:13
Bluey y BurriKiKi
Рет қаралды 20 МЛН
МЫ ПОХОДУ ЧТО-ТО НАПУТАЛИ
0:20
МАКАРОН
Рет қаралды 8 МЛН
😱ВСЕМ БЫ ТАКИЕ СТАЛЬНЫЕ НЕРВЫ
0:18
MEXANIK_CHANNEL
Рет қаралды 9 МЛН
как попасть в закулисье в schoolboy runaway
0:51