Check the blog article here: blog.geuer-pollmann.de/blog/2019/10/14/locally-evaluating-azure-arm-templates ...
- Install Erlang from erlang.org
- Install Elixir from elixir-lang.org
git clone https://github.com/chgeuer/ex_microsoft_arm_evaluator
cd ex_microsoft_arm_evaluatormix deps.getmix compileset iex_with_werl=trueiex -S mixstart https://microsoft.com/deviceloginalias Microsoft.Azure.TemplateLanguageExpressions.{Resource, Context, DeploymentContext, Evaluator.Resource}
login_cred = DemoUtil.login()
sub = "724467b5-bee4-484b-bf13-d6a5505d2b51"
deploymentContext = %DeploymentContext{ subscriptionId: sub, resourceGroup: "longterm" } |> DeploymentContext.with_device_login(login_cred)
Resource.subscription([], Context.new() |> Context.with_deployment_context(deploymentContext))
"sample_files/1.json" |> DemoUtil.transform(deploymentContext, %{})
"sample_files/automation.json" |> DemoUtil.transform(deploymentContext, %{"adminPassword" => "SuperSecret123.-##"})- All numeric / logical / array&objects / comparison functions
- Custom function definitions should work
- The
reference()function needs more dummy data for scenarios where the users are not signed-in to their real subscription. - The
copyIndex()function currently doesn't duplicate nodes in the document.
- Check
ChrisLGardner/ArmTemplateValidationfor a PowerShell-based implementation by @HalbaradKenafin.