When working with Infrastructure as Code (IaC) it’s difficult to know sometimes where to start. You have a couple of options, go to the Terraform on

Azure Terrafy – Import your existing Azure infrastructure into Terraform HCL

submited by
Style Pass
2022-05-13 21:30:10

When working with Infrastructure as Code (IaC) it’s difficult to know sometimes where to start. You have a couple of options, go to the Terraform on Azure documentation, then figure out how to write some Terraform templates. Or you can start with a tool like NubesGen  that allows you to build your Terraform files (and Bicep) from an easy set of options, spitting out a Terraform template that includes all of the best practices.

Those options are great when you’re wanting to create new infrastructure, but previously, you couldn’t import your existing infrastructure into Terraform. Ah, but now you can! Introducing Azure Terrafy! 

Azure Terrafy allows you to easily and quickly import your existing Azure infrastructure into Terraform HCL AND import it into your Terraform state (Learn about state files here. This has been one of the BIGGEST and coolest feature releases that all of you in the community (and myself) have been asking for!  It’s great to adopt new working tools and practices for when we start a new project, but every single customer I work with wants to know how to manage their legacy infrastructure. The biggest challenge we face in ITOps is managing that legacy infrastructure.

          Aztfy found 250 resources in my resource group along with their dependencies, scrolling through I can proceed to the end of the screen and review my options.  From this view we can filter our results, show any errors/recommendations, or import our resources:

Leave a Comment