Skip to content
master
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
lib
 
 
rel
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Microsoft.ARM.Evaluator

Check the blog article here: blog.geuer-pollmann.de/blog/2019/10/14/locally-evaluating-azure-arm-templates ...

How to install

Clone the code

git clone https://github.com/chgeuer/ex_microsoft_arm_evaluator
cd ex_microsoft_arm_evaluator

Fetch required Elixir packages

mix deps.get

Compile the whole thing

mix compile

On Windows, set this env variable

set iex_with_werl=true

Launch the interactive Elixir shell

iex -S mix

demo time

start https://microsoft.com/devicelogin
alias 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.-##"})

Implementation Status

  • 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.

Other projects in that problem space

About

A utility to provide quick feedback on Azure ARM templates.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages