Terraform interview asking 1 Difference between terraform module and terraform workspace , what we have use when scenario 2 why you need a terraform local state file , when you need centralized state file in S3 , each has it own usecase and sometimes its equally important your local state file in your host , what is that scenario where local state file becomes critical 3 i want manage .tf file with updated versions only of aws , whats that option where we can decide version of aws updation as per need or customize it in .tf file 4 whats syntax to manage lock in your state file , if developer 1 doing some work , developer 2 should not be allowed until lock is released? 5 why you use import functionality in terraform ? what is syntax of import in terraform 6 what is tainted and untainted in the terraform 7 what you mean by a terraform refresh ? 8 What need to provisioner , why you need provisioner in terraform?
@mosksky3 жыл бұрын
Ty Ned, another good knowledge transfer! Great job on naming TF tue folders :)
@AlexDresko Жыл бұрын
The magic tool that you are looking for to make all of this easier is aztfy. It can import a resource and all of its child resources, and then spit out the HCL. You can also pointed at a resource Group and it will do the same thing for the entire Resource Group. And it's from Microsoft.
@NedintheCloud Жыл бұрын
Love aztfy! I did a whole video about it: kzbin.info/www/bejne/d3XRhZ5pipdlm9k
@justindeemer62602 жыл бұрын
Ned, appreciate the videos, these have really helped in allowing me to get refreshed on terraform. Appreciate the honest review you give on these different topics especially the terraform import functionality, which is where I am at currently. Looking to import some of my already deployed infrastructure and I saw another one of your videos on terraformer, again, great work and saving me the frustration of wasting my time with it. However, I was curious, if you have had a chance to look at terracognita? Not opposed to doing the manual labor and again, videos like this one are priceless in learning how to accomplish these tasks. If you are looking for recommendations, would love to see a review on the terracognita capability.
@ziaurrehman47382 жыл бұрын
Thanks for adding description ❤🙏
@pakwilli3 жыл бұрын
Great video thanks Ned! I had mistakenly deleted my state file and am in the process of rebuilding it. This video was a real lifesaver as it pointed me in the right direction!
@NedintheCloud3 жыл бұрын
Glad it helped!
@say2merohit3 жыл бұрын
thanks a nice Start Ned Loved it :)
@skillbuilderzone3 жыл бұрын
Perfect!! This is what I needed.
@90DaysOfDevOps3 жыл бұрын
Good stuff Ned, So you would need still need to create from the state file your main.tf configurations?
@NedintheCloud3 жыл бұрын
Terraform will handle creating the state file if it doesn't already exist. You could have an existing config with a state file, and use import to add resources that were created outside of Terraform. That's a scenario I deal with in my Terraform Deep Dive course on Pluralsight.
@pradiptarakshit77513 жыл бұрын
Great Tutorial Ned, Loved it :)
@prabhatjaiswal60343 жыл бұрын
Hi I have configured my terraform backend and then did import but my state file not pushed to containers how do I pushed my state file to containers after importing resource
@devlinthornicroft99753 жыл бұрын
Great vid as usual.
@jeroenketelaar35673 жыл бұрын
Loved this one!
@franklinlisboa54493 жыл бұрын
tnx, It helped a lot
@gauravmanshani2062 жыл бұрын
Hi Ned. Is there any way to import resources in one go ?
@Thankyoubaby12 жыл бұрын
Sounds like someone has a case of the Mondays! (on a Tuesday apparently)
@susovanpanja3 жыл бұрын
If I need to delete the imported subnet or if I imported a VM but need to scale it up, how can I do that?
@NedintheCloud3 жыл бұрын
You can remove the subnet from the configuration, and Terraform will destroy it on the next apply. You can change the size of the VM, but that may delete the VM and recreate it.
@pallabkolkata3 жыл бұрын
@Ned in the Cloud How do i specify an existing resource when i am creating a new resource using main.tf, say i have a resource group existing before which i created using Terraform and now i want to reference that existing RG while deploying a new VM say, so how do i specify that, just giving the name explicitly is not working
@NedintheCloud3 жыл бұрын
They have to be in the same state if you want to refer to the resource group using its address in the config file. Your other option is to add the resource group as a data source, if you aren't going to manage its lifecycle with the config. registry.terraform.io/providers/hashicorp/azurerm/latest/docs/data-sources/resource_group
@Ravithezealous3 жыл бұрын
After importing the AWS infrastructure to terraform can I export this infrastructure to a different AWS account to spin all the same infrastructure there if no then what is the method to achieve the same.
@NedintheCloud3 жыл бұрын
There's not really a way to transfer infrastructure from one AWS account to another. You could use the same configuration with a separate workspace to deploy identical infrastructure to a different account, but you would still need to transfer the data stored in any of the resources in the source account.
@toshumalhotra Жыл бұрын
Of course you can do it...
@brads20412 жыл бұрын
Don't forget the cover page
@ipadair88412 жыл бұрын
How to import forti os providers
@michaelhanley71123 жыл бұрын
Hi How would this work for AWS Cloud Formation?
@NedintheCloud3 жыл бұрын
You can delete a stack in Cloud Formation without deleting the underlying infrastructure. I would suggest getting everything imported into Terraform first and then removing it from Cloud Formation.
@aefwon39363 жыл бұрын
!! love u sir !!
@freibuis3 жыл бұрын
config != state :) just saying
@NedintheCloud3 жыл бұрын
Totally! You can use the same config for multiple environments with workspaces. The contents of the state is a combination of variables, configuration, and actual resources in the target providers.