BCPNFR15 - AVM Module Issue template file
As part of the “initial Pull Request” (that publishes the first version of the module), module owners MUST add an entry to the AVM Module Issue template
file in the BRM repository (
here
).
As part of the “initial Pull Request” (that publishes the first version of the module), module owners MUST add an entry to the AVM Module Issue template
file in the BRM repository (
here
).
For each test case in the e2e
folder, you can optionally add post-deployment Pester tests that are executed once the corresponding deployment completed and before the removal logic kicks in.
To leverage the feature you MUST:
To improve the usability of primitive module properties declared as strings, you SHOULD declare them using a type which better represents them, and apply any required casting in the module on behalf of the user.
This script/tool is currently being developed by the AVM team and will be made available very soon.
Bicep modules documentation MUST be automatically generated via the provided script/tooling from the AVM team, providing the following headings:
Usage examples for Bicep modules MUST be provided in the following formats:
Bicep file (orchestration module style) - .bicep
module <resourceName> 'br/public:avm/[res|ptn|utl]/<publishedModuleName>:>version<' = {
name: '${uniqueString(deployment().name, location)}-test-<uniqueIdentifier>'
params: { (...) }
}
JSON / ARM Template Parameter Files - .json
Bicep modules MAY provide parameter input examples for parameters using the metadata.example
property via the @metadata()
decorator.
Example:
@metadata({
example: 'uksouth'
})
@description('Optional. Location for all resources.')
param location string = resourceGroup().location
@metadata({
example: '''
{
keyName: 'myKey'
keyVaultResourceId: '/subscriptions/11111111-1111-1111-1111-111111111111/resourceGroups/my-rg/providers/Microsoft.KeyVault/vaults/myvault'
keyVersion: '6d143c1a0a6a453daffec4001e357de0'
userAssignedIdentityResourceId '/subscriptions/11111111-1111-1111-1111-111111111111/resourceGroups/my-rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myIdentity'
}
'''
})
@description('Optional. The customer managed key definition.')
param customerManagedKey customerManagedKeyType
It is planned that these examples are automatically added to the module readme’s parameter descriptions when running either the Set-ModuleReadMe
or Set-AVMModule
scripts (available in the utilities folder).
As per BCPFR2 , module owners MAY define common RBAC Role Definition names and IDs within a variable to allow consumers to define a RBAC Role Definition by their name rather than their ID.
Module owners MUST include the following roles in the variable for RBAC Role Definition names:
8e3af657-a8ff-443c-a75c-2fe8c4bcb635
b24988ac-6180-42a0-ab88-20f7382dd24c
acdd72a7-3385-48ef-bd42-f606fba81ae7
18d7d88d-d35e-4fb5-a5c3-7773c20a72d9
f58310d9-a9f6-439a-9e8d-f62e7b41a168
Review the Bicep Contribution Guide’s ‘RBAC Role Definition Name Mapping’ section for a code sample to achieve this requirement.
Modules will have lots of parameters that will differ in their requirement type (required, optional, etc.). To help consumers understand what each parameter’s requirement type is, module owners MUST add the requirement type to the beginning of each parameter’s description. Below are the requirement types with a definition and example for the description decorator:
Module owners SHOULD use lower camelCasing for naming the following:
For example: camelCasingExample
(lowercase first word (entirely), with capital of first letter of all other words and rest of word in lowercase)