Skip to content

Instantly share code, notes, and snippets.

@Usman0111
Last active September 20, 2023 15:31
Show Gist options
  • Save Usman0111/e6b44b67338b74042af100dae7f8fce2 to your computer and use it in GitHub Desktop.
Save Usman0111/e6b44b67338b74042af100dae7f8fce2 to your computer and use it in GitHub Desktop.

Questions for inline params validation with validate-params vs build-params command

1. Do we want to perform inline param validation when no value for --template is given with Az Cli?

Example,

az deployment group create \
--parameters 'params.bicepparam' \
--parameters foo='inline value'

Here we can't do any validation for parameter foo using validate-params command (which can only use --template argument value) but can with build-params command (which can use either using declaration or --template argument value)

2. Do we want to limit the scope of mix/matching feature of Az Cli when a .bicepparam file is used?

Example,

Following would be possible:

az deployment group create \
--template 'main.bicep'
--parameters 'params.bicepparam' \
--parameters foo='inline value' bar='another value'
--parameters param2.json
--parameters '{ //inline stringified json }'

But following won't be possible:

az deployment group create \
--template 'main.bicep'
--parameters param2.json
--parameters foo='inline value'
--parameters 'params.bicepparam' \
--parameters bar='another value'
--parameters '{ //inline stringified json }'

In other words, we would need to enforce the following:

  • .bicepparam file will always be provided first (only one file allowed)
  • all other (none .bicepparam) parameters would be combined and then validated as the .bicepparam file is being built
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment