-
Notifications
You must be signed in to change notification settings - Fork 449
Contribution guide Generate module readme
CARMLPipelinePrincipal edited this page Oct 14, 2023
·
6 revisions
As per the module design structure, every module in the CARML library requires a ReadMe markdown file documenting the set of deployable resource types, input and output parameters and a set of relevant template references from the official Azure Resource Reference documentation.
The ReadMe generator utility aims to simplify contributing to the CARML library, as it supports creating the module ReadMe markdown file from scratch or updating it.
You can find the script under /utilities/tools/Set-ModuleReadMe.ps1
- Using the provided template path, the script first converts it to ARM/JSON if necessary (i.e., if a path to a Bicep file was provided)
- If the intended readMe file does not yet exist in the expected path, it is generated with a skeleton (with e.g., a generated header name)
- The script then goes through all sections defined as
SectionsToRefresh
(by default all) and refreshes the sections' content (for example, for theParameters
) based on the values in the ARM/JSON Template. It detects sections by their header and always regenerates the full section. - Once all are refreshed, the current ReadMe file is overwritten. Note: The script can be invoked combining the
WhatIf
andVerbose
switches to just receive an console-output of the updated content.
For details on how to use the function, please refer to the script's local documentation.
Note: The script must be loaded ('dot-sourced') before the function can be invoked.