You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
So that an IT Admin has flexibility in how to run Bicep/ARM templates in the bicep/examples folder.
Description
Most of our examples use the shared variable pattern for invoking the Bicep templates. It is a good pattern, however, it is limited because the user is required to have a json file with a hard-coded name and structure, and Bicep compiles the contents of the file into the ARM template, preventing us from adding the ARM template to the repo.
We want to continue to support the shared variable file pattern, but we need to also support other patterns for setting parameters, including using a parameters file, a PoweShell object, command line parameters, environment variables, and the deployment resource provider.
The scope of this work includes:
Establishing a pattern that all examples can implement, including required files, file names, etc.
Implementing the pattern on all existing examples
Documentation in the bicep/examples/README.md
There may be need to add additional templates to each example, e.g., using the shared variable file pattern may require having a separate template that loads the shared variable file and executes the main example template as a module.
Here's an example of what the pattern could look like. This is not a specification, but an example of how to implement the acceptance criteria for this backlog item.
examples
└── tier3
├── deployment-rp.tier3.bicep <-- Bicep template that uses Azure deployment resource provider to look up MLZ deployment outputs and map to tier3 template inputs.
├── README.md <-- Parameter documentation. Link to parent folder README.md for how to execute the template.
├── parameters.tier3.json <-- Example of a Bicep parameters file in json, with values defaulted from tier3.bicep.
├── parameters.tier3.ps1 <-- Example of a PowerShell parameters object, with values defaulted from tier3.bicep.
├── shared-variable.tier3.bicep <-- Bicep template that uses the shared variable file pattern and maps parameter values to tier3.bicep.
├── tier3.bicep <-- The main template for the example.
└── tier3.json <-- The ARM template compiled from the tier3.bicep template.
NOTE: The above is an example of a repeatable pattern to implement for all examples. It is not requirements or specification.
Automation could be used to generate some of the files, like the json parameters file and the PowerShell parameters object file.
Benefit/Result/Outcome
So that an IT Admin has flexibility in how to run Bicep/ARM templates in the
bicep/examples
folder.Description
Most of our examples use the shared variable pattern for invoking the Bicep templates. It is a good pattern, however, it is limited because the user is required to have a json file with a hard-coded name and structure, and Bicep compiles the contents of the file into the ARM template, preventing us from adding the ARM template to the repo.
We want to continue to support the shared variable file pattern, but we need to also support other patterns for setting parameters, including using a parameters file, a PoweShell object, command line parameters, environment variables, and the deployment resource provider.
The scope of this work includes:
bicep/examples/README.md
There may be need to add additional templates to each example, e.g., using the shared variable file pattern may require having a separate template that loads the shared variable file and executes the main example template as a module.
Here's an example of what the pattern could look like. This is not a specification, but an example of how to implement the acceptance criteria for this backlog item.
Automation could be used to generate some of the files, like the json parameters file and the PowerShell parameters object file.
See #536 for additional context.
Acceptance Criteria
bicep/examples
folder contains a readme with descriptions of the patterns and examples for running the examples using the patterns below.The text was updated successfully, but these errors were encountered: