I've recently taken over a complex Azure setup that includes one main tenant and a few smaller ones. The environment is only partially managed using Bicep since a lot of it was already established before Bicep came into play, and there's been more configuration done outside of Bicep along the way. While I have some knowledge of Terraform, I'm finding it challenging to navigate the limited documentation available for Bicep. Additionally, I'm worried about the job market since there seem to be fewer opportunities for Bicep experience. I'm considering my options and would love to hear your thoughts:
1. Should I try to transition as much as possible back to Bicep using the 'existing' keyword, even though I know that will be time-consuming?
2. Alternatively, should I start working with Terraform instead? I realize this would involve writing a significant amount of HCL, but I might take advantage of the new bulk import feature to avoid importing hundreds of resource IDs one by one.
Has anyone here faced a similar situation?
4 Answers
Have you looked into tools like Terraformer? They can help automate some of the initial codification before you decide to fully switch to Terraform afterward. It might save you some headaches.
You might want to consider using GitHub Copilot or similar AI tools for the conversion process. I’ve done this type of migration before, and with some setup, it can work quite well. It might take an hour or two to fine-tune, but it definitely streamlines the conversion and state import process.
I just completed a migration from Terraform to Bicep because a client insisted on it. I found that Microsoft has released some decent documentation on Bicep, although it can sometimes be a bit sketchy regarding certain parameters. It's not perfect, but there are resources out there.
Yeah, it's frustrating when they seem to go backwards. Who thought deprecation was a good idea?
I looked into this, and it seems that the bulk import feature in Terraform only supports AWS for now, not Azure resources. In my experience, I've had mixed results using a tool called aztfexport, which can help with situations like yours where part of the infrastructure is defined in Bicep and some is not. Just keep in mind it does have some limitations that you can check out in the README.

I did notice some Azure verified modules were helpful, but one of the crucial ones I needed has been deprecated without a clear replacement. Any suggestions for alternatives?