Is it possible to compile a Terraform script into an ARM template?
I assume this should be somehow possible, since I think Terraform is internally doing exactly this, when deploying IaaS to Azure.
Is it possible to compile a Terraform script into an ARM template?
I assume this should be somehow possible, since I think Terraform is internally doing exactly this, when deploying IaaS to Azure.
You can export the ARM templates from Azure portal after deploying resources with Terraform.
I don't know if a tool exists to do this more elegantly.
I dont think there is an easy way of doing that (i.e. there is no tool capable of doing that), but you can capture REST requests terraform is doing against Azure API, they would closely match what an ARM Template does, however you would still require a lot of manual editing, because ARM Templates have their own structure, their own syntax etc.
An alternative - would be to just rewrite it, terraform syntax is pretty much a copy of what arm templates look like (apart from the way operators are implemented and so on and so fourth)