How to Import Existing Azure Resources Into Terraform Super Easy!!

Поделиться
HTML-код
  • Опубликовано: 8 фев 2025
  • Do you have a cloud environment that needs to import existing azure resources into terraform? This video goes through a simple step by step process on how to do that a safe way.
    Once you are able to import your existing azure resources into terraform, you will be able to automate how you create, delete and update your cloud infrastructure.
    This video goes through how to import and azure resource group and an azure virtual network. Drop a comment below if you have questions on other imports.
    ABOUT OUR CHANNEL
    My channel covers various topics about networking, automation and cloud technologies . We cover lots of cool stuff such as cisco, terraform, aws, firewalls, security and more
    Check out my channel here:
    / @letmetechyou
    Don’t forget to subscribe!
    CHECK OUT MY OTHER VIDEOS on Terraform Here:
    • Learning Terraform for...
    FIND MY BLOG AT
    letmetechyou.com
    GET IN TOUCH
    Contact us at info@letmetechyou.com for questions and video ideas.
  • НаукаНаука

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

  • @letmetechyou
    @letmetechyou  7 месяцев назад

    Check out my latest video on how to import using terraforms import block using a for_each ruclips.net/video/nYlw773UEp4/видео.html

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

    This video helped me solving import problem in my org. I want to appreciate you.

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

    Awesome LetmeTechYou.. I was trying Azure Terraffy which wasn't working due to various unknown reasons. But by doing this, Terraform itself becomes a learning process.

    • @letmetechyou
      @letmetechyou  7 месяцев назад

      Thanks. I’m glad it helped. Hope I can continue to make videos that could be of benefit

  • @xcode7938
    @xcode7938 2 года назад +4

    Awesome Video and exactly what I wanted to know. You are awesome.

  • @Southpaw07
    @Southpaw07 7 месяцев назад

    Thank you Kevin great stuff! . perhaps can use both tools - aztfexport to create the exported tf config, refactor the code and then run terraform import .. should help speed up the process if there are lots of resources to import... will give this a try ..

    • @letmetechyou
      @letmetechyou  7 месяцев назад

      Thanks. Check out my other video on how to use the import block which i think is a lot easier. ruclips.net/video/nYlw773UEp4/видео.html

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

    I have 30 resources, I wanted to import all of them, Is there any other way to get them using single command ? or Azure CLI command without Terraform? az resource list -g is not giving complete details about resource from the resource properties. Is there anyway to get complete details of the resource using Azure CLI? Please suggest

    • @letmetechyou
      @letmetechyou  Год назад

      yes you can use a tool called aztfy. here is an article i created talking about that letmetechyou.com/import-your-entire-azure-environment-using-terrafy/

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

    First thanks for creating this video and I have one question to ask. After watching this, I imported a Terraform Resource Group successfully. Subsequently, I created all the resources under that resource group, such as VM, network, subnet, public IP, etc. Now, when I am trying to run Terraform destroy, it is stating that it will delete everything, including the Resource Group. However, I don't want that because I didn't create it; I imported it. Please suggest a solution

    • @letmetechyou
      @letmetechyou  Год назад +2

      Once you import a resource under terraform management any commands you run against it will affect that resource also. That is because it’s it’s now loaded into the state file.

    • @linux4kakkar
      @linux4kakkar Год назад

      @@letmetechyou so what option I have now to delete everything except RG.

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

    Thanks

  • @nightwintertooth9502
    @nightwintertooth9502 Год назад +2

    Goddd i wish i would have seen this video laat week i had an entire hub and spoke firewall with policies a bastion box and a host pool with intune registration set up and fsync with GOP policy and shared managed storage and started over to work with terriform realising i didnt have to. 😂😂

    • @letmetechyou
      @letmetechyou  Год назад

      oh dang that sucks lol. Yea I have found it easier sometimes to do imports where it makes since. What I also do sometimes is use a tool call aztfy what allows you to easily import full resource groups into terraform ruclips.net/video/oOokX83DqMU/видео.html I'll save the terraform config and adjust it to how I like with the naming and then do my own imports. But you can also have the tool import the config into your tfstate as well

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

      @@letmetechyou wow thanks! Going to have to play around with that. I just got devops pipeline with tfstate storage backend in a storage account functioning so onward

  • @HrishiCloud
    @HrishiCloud 4 месяца назад

    How should we interact with a blob storage

  • @johnho74
    @johnho74 Год назад

    Great video...used this to import subnet into VM template. Have you worked with the AZAPI provider?

    • @letmetechyou
      @letmetechyou  Год назад

      No I never used that one. What are some things you use that provider for.

  • @KonchadaGreeshma
    @KonchadaGreeshma Год назад

    Hi , Can we use the name of the resource while executing the import command instead of id of the resource, Can we code the terraform provider in such a way that it will allow us to use the name while executing import command.

    • @letmetechyou
      @letmetechyou  Год назад

      No I think you have to use the id. But you could look into the new method that terraform has. You can use what’s called an import block.

  • @paidipalasaikumar6085
    @paidipalasaikumar6085 Год назад

    iam unable to do the same thing through pipelines, could you please post a video how to do the same process using azure pipeline script

  • @DavidBenOtto
    @DavidBenOtto Год назад

    How to import resources directly from Azure Pipelines. Because in my environment resources provisionning need to be automated through pipelines. And I can't use Terrafy as it's not compliant to our policies

    • @letmetechyou
      @letmetechyou  Год назад

      Since importing is a manual process you would just have to add that step into your pipeline to import in the resources that you want. You would just need to adjust the command to import in the specific resources one by one

  • @danidelavlasca
    @danidelavlasca 3 месяца назад

    That is only easy for test resources. For complex architectures, this is not an option...

    • @letmetechyou
      @letmetechyou  3 месяца назад

      @@danidelavlasca yea only for single resources. I use this method in an org with massive architecture. ruclips.net/video/nYlw773UEp4/видео.htmlsi=D1OIcNE2zrrFL8_Z I’ve import in thousands of resources with this method with ease.