1
votes

is there any code generator for Azure Terraform?

Actually i am trying to add Azure app service to existing resource group. For this we need a state configuration file, which can be generated only ( Terraform import ) if we have full Terraform code already written for that resource group.

I saw, Using Terraform to import existing resources on Azure and Update existing app service with Terraform ,but here i am talking about the thousands of resource groups.

Thanks

Gill

2

2 Answers

0
votes

You would, to my knowledge, need to use terraform import against all of the existing resources that you have / want to consumse via terraform.

In saying that if you only want to manage the Azure App Service with Terraform and not everything else you can just simply pass all the requirements for the resource in and only manage this in the terraform state file.

0
votes

Hi Lachie thanks for reply, I Found the solution using AZ2TF tool.

Thanks to Mr Agarciamiravet, who explained all the steps to use AZ2TF tool ( by using Docker) at

https://recetasdevops.com/migra-tu-infraestructura-actual-de-azure-a-terraform-con-py-az2tf/

this worked very well for me.

Thanks Gill