Add support for inline() parameter overrides in .bicepparam files #18374
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Adding an
inline()function to.bicepparamfiles that allows parameter values to be provided at deployment time through theBICEP_PARAMETERS_OVERRIDESenvironment variable (populated by Azure CLI from command-line arguments).The function acts as a placeholder during authoring but gets replaced with actual values during compilation.
The CLI passes these overrides (
sku=Basicandlocation=westus) to the Bicep compiler through theBICEP_PARAMETERS_OVERRIDESenvironment variable as json.Example usage
The
inline()function:.bicepparamfilesImplementation details;
Direct assignment (Parameter name)
param foo = inline()→ usesfoofrom overridesObject property (Property name)
param foo = { key1: inline() }→ useskey1from overridesArray element (Parameter name)
param foo = [inline()]→ usesfoofrom overridesNested objects (Property chain)
param foo = { nested: { key: inline() } }→ usesnested.keyfrom overridesDetails
Fixes #10454
Checklist
Microsoft Reviewers: Open in CodeFlow