Importing Infrastructure into Terraform

Поделиться
HTML-код
  • Опубликовано: 7 ноя 2024

Комментарии • 37

  • @erfanebrahimi9748
    @erfanebrahimi9748 7 месяцев назад +1

    This training was awesome. Thank you Ned.

  • @user-bv6il2nk4t
    @user-bv6il2nk4t 3 года назад +4

    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?

  • @mosksky
    @mosksky 3 года назад +3

    Ty Ned, another good knowledge transfer! Great job on naming TF tue folders :)

  • @ziaurrehman4738
    @ziaurrehman4738 2 года назад

    Thanks for adding description ❤🙏

  • @AlexDresko
    @AlexDresko Год назад +1

    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
      @NedintheCloud  Год назад

      Love aztfy! I did a whole video about it: ruclips.net/video/ADnTk3U22ew/видео.html

  • @justindeemer6260
    @justindeemer6260 2 года назад

    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.

  • @pakwilli
    @pakwilli 3 года назад

    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!

  • @90DaysOfDevOps
    @90DaysOfDevOps 3 года назад

    Good stuff Ned, So you would need still need to create from the state file your main.tf configurations?

    • @NedintheCloud
      @NedintheCloud  3 года назад +1

      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.

  • @prabhatjaiswal6034
    @prabhatjaiswal6034 3 года назад

    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

  • @devlinthornicroft9975
    @devlinthornicroft9975 3 года назад +1

    Great vid as usual.

  • @skillbuilderzone
    @skillbuilderzone 3 года назад

    Perfect!! This is what I needed.

  • @say2merohit
    @say2merohit 3 года назад +1

    thanks a nice Start Ned Loved it :)

  • @gauravmanshani206
    @gauravmanshani206 2 года назад

    Hi Ned. Is there any way to import resources in one go ?

  • @jeroenketelaar3567
    @jeroenketelaar3567 3 года назад +1

    Loved this one!

  • @pradiptarakshit7751
    @pradiptarakshit7751 3 года назад

    Great Tutorial Ned, Loved it :)

  • @pallabkolkata
    @pallabkolkata 3 года назад

    @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

    • @NedintheCloud
      @NedintheCloud  3 года назад

      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

  • @ipadair8841
    @ipadair8841 2 года назад

    How to import forti os providers

  • @susovanpanja
    @susovanpanja 3 года назад

    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?

    • @NedintheCloud
      @NedintheCloud  3 года назад

      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.

  • @franklinlisboa5449
    @franklinlisboa5449 3 года назад +1

    tnx, It helped a lot

  • @Ravithezealous
    @Ravithezealous 3 года назад

    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.

    • @NedintheCloud
      @NedintheCloud  3 года назад

      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
      @toshumalhotra Год назад

      Of course you can do it...

  • @michaelhanley7112
    @michaelhanley7112 3 года назад

    Hi
    How would this work for AWS Cloud Formation?

    • @NedintheCloud
      @NedintheCloud  3 года назад +1

      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.

  • @Thankyoubaby1
    @Thankyoubaby1 2 года назад

    Sounds like someone has a case of the Mondays! (on a Tuesday apparently)

  • @brads2041
    @brads2041 2 года назад

    Don't forget the cover page

  • @aefwon3936
    @aefwon3936 3 года назад

    !! love u sir !!

  • @freibuis
    @freibuis 3 года назад

    config != state :) just saying

    • @NedintheCloud
      @NedintheCloud  3 года назад +1

      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.