Open mattias-fjellstrom opened 1 year ago
Addendum:
Perhaps the REPL can be started in a given scope by adding a flag to the command, then even scope-like functions like resourceGroup()
would be available, e.g.:
$ az bicep console --scope /subscriptions/<id>/resourceGroups/rg-sample
> resourceGroup().location
'swedencentral'
>
> resourceGroup().name
'rg-sample'
Is your feature request related to a problem? Please describe. Constructing complicated expressions using one or more built-in functions in Bicep can be tricky, and there is a need to test the expressions. In my experience this is most often string manipulation functions, but it could also be something else. To test these types of expressions today you need to create an actual deployment at a scope in Azure. This is unnecessarily time consuming.
Describe the solution you'd like A REPL/console experience similar to what Terraform has (
terraform console
) that has most functions available for testing. Only functions that make sense need to be included, i.e.resourceGroup()
would not make sense in a REPL unless you can scope the REPL to a given scope in Azure (e.g. a resource group).Example: