diff --git a/avm/res/batch/batch-account/README.md b/avm/res/batch/batch-account/README.md index 3130bfbd96..4ed353ca53 100644 --- a/avm/res/batch/batch-account/README.md +++ b/avm/res/batch/batch-account/README.md @@ -1,7 +1,7 @@ # Batch Accounts `[Microsoft.Batch/batchAccounts]` > ⚠️THIS MODULE IS CURRENTLY ORPHANED.⚠️ -> +> > - Only security and bug fixes are being handled by the AVM core team at present. > - If interested in becoming the module owner of this orphaned module (must be Microsoft FTE), please look for the related "orphaned module" GitHub issue [here](https://aka.ms/AVM/OrphanedModules)! @@ -32,7 +32,7 @@ The following section provides usage examples for the module, which were used to >**Note**: Each example lists all the required parameters first, followed by the rest - each in alphabetical order. ->**Note**: To reference the module, please use the following syntax `br/public:avm-res-batch-batchaccount:1.0.0`. +>**Note**: To reference the module, please use the following syntax `br/public:avm/res/batch/batch-account:0.1.1`. - [Using only defaults](#example-1-using-only-defaults) - [Using Customer-Managed-Keys with User-Assigned identity](#example-2-using-customer-managed-keys-with-user-assigned-identity) @@ -49,7 +49,7 @@ This instance deploys the module with the minimum set of required parameters. via Bicep module ```bicep -module batchAccount 'br/public:avm-res-batch-batchaccount:1.0.0' = { +module batchAccount 'br/public:avm/res/batch/batch-account:0.1.1' = { name: '${uniqueString(deployment().name, location)}-test-bbamin' params: { // Required parameters @@ -145,7 +145,7 @@ This instance deploys the module using Customer-Managed-Keys using a User-Assign via Bicep module ```bicep -module batchAccount 'br/public:avm-res-batch-batchaccount:1.0.0' = { +module batchAccount 'br/public:avm/res/batch/batch-account:0.1.1' = { name: '${uniqueString(deployment().name, location)}-test-bbaencr' params: { // Required parameters @@ -235,7 +235,7 @@ This instance deploys the module with most of its features enabled. via Bicep module ```bicep -module batchAccount 'br/public:avm-res-batch-batchaccount:1.0.0' = { +module batchAccount 'br/public:avm/res/batch/batch-account:0.1.1' = { name: '${uniqueString(deployment().name, location)}-test-bbamax' params: { // Required parameters @@ -447,7 +447,7 @@ This instance deploys the module in alignment with the best-practices of the Azu via Bicep module ```bicep -module batchAccount 'br/public:avm-res-batch-batchaccount:1.0.0' = { +module batchAccount 'br/public:avm/res/batch/batch-account:0.1.1' = { name: '${uniqueString(deployment().name, location)}-test-bbawaf' params: { // Required parameters @@ -628,7 +628,14 @@ module batchAccount 'br/public:avm-res-batch-batchaccount:1.0.0' = { List of allowed authentication modes for the Batch account that can be used to authenticate with the data plane. - Required: No - Type: array -- Allowed: `[AAD, SharedKey, TaskAuthenticationToken]` +- Allowed: + ```Bicep + [ + 'AAD' + 'SharedKey' + 'TaskAuthenticationToken' + ] + ``` ### Parameter: `customerManagedKey` @@ -875,14 +882,15 @@ Network access profile. It is only applicable when publicNetworkAccess is not ex Optional. Network access profile for batchAccount endpoint (Batch account data plane API). - Required: No -- Type: object - -### Parameter: `networkProfile.nodeManagementAccess` - -Optional. Network access profile for nodeManagement endpoint (Batch service managing compute nodes for Batch pools). - -- Required: No -- Type: object +- Type: string +- Default: `'Deny'` +- Allowed: + ```Bicep + [ + 'Allow' + 'Deny' + ] + ``` ### Parameter: `poolAllocationMode` @@ -890,7 +898,13 @@ The allocation mode for creating pools in the Batch account. Determines which qu - Required: No - Type: string - Default: `'BatchService'` -- Allowed: `[BatchService, UserSubscription]` +- Allowed: + ```Bicep + [ + 'BatchService' + 'UserSubscription' + ] + ``` ### Parameter: `privateEndpoints` @@ -1066,7 +1080,14 @@ Whether or not public network access is allowed for this resource. For security - Required: No - Type: string - Default: `''` -- Allowed: `['', Disabled, Enabled]` +- Allowed: + ```Bicep + [ + '' + 'Disabled' + 'Enabled' + ] + ``` ### Parameter: `roleAssignments` @@ -1154,7 +1175,13 @@ The authentication mode which the Batch service will use to manage the auto-stor - Required: No - Type: string - Default: `'StorageKeys'` -- Allowed: `[BatchAccountManagedIdentity, StorageKeys]` +- Allowed: + ```Bicep + [ + 'BatchAccountManagedIdentity' + 'StorageKeys' + ] + ``` ### Parameter: `tags` diff --git a/avm/res/cognitive-services/account/README.md b/avm/res/cognitive-services/account/README.md index fe08ff60c8..a33e500250 100644 --- a/avm/res/cognitive-services/account/README.md +++ b/avm/res/cognitive-services/account/README.md @@ -32,7 +32,7 @@ The following section provides usage examples for the module, which were used to >**Note**: Each example lists all the required parameters first, followed by the rest - each in alphabetical order. ->**Note**: To reference the module, please use the following syntax `br/public:avm-res-cognitiveservices-account:1.0.0`. +>**Note**: To reference the module, please use the following syntax `br/public:avm/res/cognitive-services/account:0.1.1`. - [Using only defaults](#example-1-using-only-defaults) - [Using large parameter set](#example-2-using-large-parameter-set) @@ -51,7 +51,7 @@ This instance deploys the module with the minimum set of required parameters. via Bicep module ```bicep -module account 'br/public:avm-res-cognitiveservices-account:1.0.0' = { +module account 'br/public:avm/res/cognitive-services/account:0.1.1' = { name: '${uniqueString(deployment().name, location)}-test-csamin' params: { // Required parameters @@ -155,7 +155,7 @@ This instance deploys the module with most of its features enabled. via Bicep module ```bicep -module account 'br/public:avm-res-cognitiveservices-account:1.0.0' = { +module account 'br/public:avm/res/cognitive-services/account:0.1.1' = { name: '${uniqueString(deployment().name, location)}-test-csamax' params: { // Required parameters @@ -407,7 +407,7 @@ This instance deploys the module as a Speech Service. via Bicep module ```bicep -module account 'br/public:avm-res-cognitiveservices-account:1.0.0' = { +module account 'br/public:avm/res/cognitive-services/account:0.1.1' = { name: '${uniqueString(deployment().name, location)}-test-csaspeech' params: { // Required parameters @@ -557,7 +557,7 @@ This instance deploys the module using Customer-Managed-Keys using a System-Assi via Bicep module ```bicep -module account 'br/public:avm-res-cognitiveservices-account:1.0.0' = { +module account 'br/public:avm/res/cognitive-services/account:0.1.1' = { name: '${uniqueString(deployment().name, location)}-test-csaecrs' params: { // Required parameters @@ -683,7 +683,7 @@ This instance deploys the module using Customer-Managed-Keys using a User-Assign via Bicep module ```bicep -module account 'br/public:avm-res-cognitiveservices-account:1.0.0' = { +module account 'br/public:avm/res/cognitive-services/account:0.1.1' = { name: '${uniqueString(deployment().name, location)}-test-csaencr' params: { // Required parameters @@ -815,7 +815,7 @@ This instance deploys the module in alignment with the best-pratices of the Well via Bicep module ```bicep -module account 'br/public:avm-res-cognitiveservices-account:1.0.0' = { +module account 'br/public:avm/res/cognitive-services/account:0.1.1' = { name: '${uniqueString(deployment().name, location)}-test-csawaf' params: { // Required parameters @@ -1211,7 +1211,33 @@ Enable/Disable usage telemetry for module. Kind of the Cognitive Services. Use 'Get-AzCognitiveServicesAccountSku' to determine a valid combinations of 'kind' and 'SKU' for your Azure region. - Required: Yes - Type: string -- Allowed: `[AnomalyDetector, Bing.Autosuggest.v7, Bing.CustomSearch, Bing.EntitySearch, Bing.Search.v7, Bing.SpellCheck.v7, CognitiveServices, ComputerVision, ContentModerator, CustomVision.Prediction, CustomVision.Training, Face, FormRecognizer, ImmersiveReader, Internal.AllInOne, LUIS, LUIS.Authoring, Personalizer, QnAMaker, SpeechServices, TextAnalytics, TextTranslation]` +- Allowed: + ```Bicep + [ + 'AnomalyDetector' + 'Bing.Autosuggest.v7' + 'Bing.CustomSearch' + 'Bing.EntitySearch' + 'Bing.Search.v7' + 'Bing.SpellCheck.v7' + 'CognitiveServices' + 'ComputerVision' + 'ContentModerator' + 'CustomVision.Prediction' + 'CustomVision.Training' + 'Face' + 'FormRecognizer' + 'ImmersiveReader' + 'Internal.AllInOne' + 'LUIS' + 'LUIS.Authoring' + 'Personalizer' + 'QnAMaker' + 'SpeechServices' + 'TextAnalytics' + 'TextTranslation' + ] + ``` ### Parameter: `location` @@ -1465,7 +1491,14 @@ Whether or not public network access is allowed for this resource. For security - Required: No - Type: string - Default: `''` -- Allowed: `['', Disabled, Enabled]` +- Allowed: + ```Bicep + [ + '' + 'Disabled' + 'Enabled' + ] + ``` ### Parameter: `restore` @@ -1555,7 +1588,28 @@ SKU of the Cognitive Services resource. Use 'Get-AzCognitiveServicesAccountSku' - Required: No - Type: string - Default: `'S0'` -- Allowed: `[C2, C3, C4, F0, F1, S, S0, S1, S10, S2, S3, S4, S5, S6, S7, S8, S9]` +- Allowed: + ```Bicep + [ + 'C2' + 'C3' + 'C4' + 'F0' + 'F1' + 'S' + 'S0' + 'S1' + 'S10' + 'S2' + 'S3' + 'S4' + 'S5' + 'S6' + 'S7' + 'S8' + 'S9' + ] + ``` ### Parameter: `tags` diff --git a/avm/res/compute/ssh-public-key/README.md b/avm/res/compute/ssh-public-key/README.md index 386e3fa622..3d7bd0da5f 100644 --- a/avm/res/compute/ssh-public-key/README.md +++ b/avm/res/compute/ssh-public-key/README.md @@ -26,7 +26,7 @@ The following section provides usage examples for the module, which were used to >**Note**: Each example lists all the required parameters first, followed by the rest - each in alphabetical order. ->**Note**: To reference the module, please use the following syntax `br/public:avm-res-compute-sshpublickey:1.0.0`. +>**Note**: To reference the module, please use the following syntax `br/public:avm/res/compute/ssh-public-key:0.1.1`. - [Using only defaults](#example-1-using-only-defaults) - [Using large parameter set](#example-2-using-large-parameter-set) @@ -44,7 +44,7 @@ This instance deploys the module with the minimum set of required parameters. via Bicep module ```bicep -module sshPublicKey 'br/public:avm-res-compute-sshpublickey:1.0.0' = { +module sshPublicKey 'br/public:avm/res/compute/ssh-public-key:0.1.1' = { name: '${uniqueString(deployment().name, location)}-test-cspkmin' params: { // Required parameters @@ -104,7 +104,7 @@ This instance deploys the module with most of its features enabled. via Bicep module ```bicep -module sshPublicKey 'br/public:avm-res-compute-sshpublickey:1.0.0' = { +module sshPublicKey 'br/public:avm/res/compute/ssh-public-key:0.1.1' = { name: '${uniqueString(deployment().name, location)}-test-cspkmax' params: { // Required parameters @@ -198,7 +198,7 @@ This instance deploys the module in alignment with the best-practices of the Azu via Bicep module ```bicep -module sshPublicKey 'br/public:avm-res-compute-sshpublickey:1.0.0' = { +module sshPublicKey 'br/public:avm/res/compute/ssh-public-key:0.1.1' = { name: '${uniqueString(deployment().name, location)}-test-cspkwaf' params: { // Required parameters diff --git a/avm/res/insights/action-group/README.md b/avm/res/insights/action-group/README.md index a28d232cc9..3babd44cab 100644 --- a/avm/res/insights/action-group/README.md +++ b/avm/res/insights/action-group/README.md @@ -23,7 +23,7 @@ The following section provides usage examples for the module, which were used to >**Note**: Each example lists all the required parameters first, followed by the rest - each in alphabetical order. ->**Note**: To reference the module, please use the following syntax `br/public:avm-res-insights-actiongroup:1.0.0`. +>**Note**: To reference the module, please use the following syntax `br/public:avm/res/insights/action-group:0.1.2`. - [Defaults](#example-1-defaults) - [Max](#example-2-max) @@ -36,7 +36,7 @@ The following section provides usage examples for the module, which were used to via Bicep module ```bicep -module actionGroup 'br/public:avm-res-insights-actiongroup:1.0.0' = { +module actionGroup 'br/public:avm/res/insights/action-group:0.1.2' = { name: '${uniqueString(deployment().name, location)}-test-iagmin' params: { // Required parameters @@ -133,7 +133,7 @@ module actionGroup 'br/public:avm-res-insights-actiongroup:1.0.0' = { via Bicep module ```bicep -module actionGroup 'br/public:avm-res-insights-actiongroup:1.0.0' = { +module actionGroup 'br/public:avm/res/insights/action-group:0.1.2' = { name: '${uniqueString(deployment().name, location)}-test-iagmax' params: { // Required parameters @@ -252,7 +252,7 @@ module actionGroup 'br/public:avm-res-insights-actiongroup:1.0.0' = { via Bicep module ```bicep -module actionGroup 'br/public:avm-res-insights-actiongroup:1.0.0' = { +module actionGroup 'br/public:avm/res/insights/action-group:0.1.2' = { name: '${uniqueString(deployment().name, location)}-test-iagwaf' params: { // Required parameters diff --git a/avm/res/key-vault/vault/README.md b/avm/res/key-vault/vault/README.md index e75dbe10c2..e324202227 100644 --- a/avm/res/key-vault/vault/README.md +++ b/avm/res/key-vault/vault/README.md @@ -30,7 +30,7 @@ The following section provides usage examples for the module, which were used to >**Note**: Each example lists all the required parameters first, followed by the rest - each in alphabetical order. ->**Note**: To reference the module, please use the following syntax `br/public:avm-res-keyvault-vault:1.0.0`. +>**Note**: To reference the module, please use the following syntax `br/public:avm/res/key-vault/vault:0.1.1`. - [Using only defaults](#example-1-using-only-defaults) - [Using large parameter set](#example-2-using-large-parameter-set) @@ -49,7 +49,7 @@ This instance deploys the module with the minimum set of required parameters. via Bicep module ```bicep -module vault 'br/public:avm-res-keyvault-vault:1.0.0' = { +module vault 'br/public:avm/res/key-vault/vault:0.1.1' = { name: '${uniqueString(deployment().name, location)}-test-kvvmin' params: { // Required parameters @@ -135,7 +135,7 @@ This instance deploys the module with most of its features enabled. via Bicep module ```bicep -module vault 'br/public:avm-res-keyvault-vault:1.0.0' = { +module vault 'br/public:avm/res/key-vault/vault:0.1.1' = { name: '${uniqueString(deployment().name, location)}-test-kvvmax' params: { // Required parameters @@ -539,7 +539,7 @@ This instance deploys the module with Private Endpoints. via Bicep module ```bicep -module vault 'br/public:avm-res-keyvault-vault:1.0.0' = { +module vault 'br/public:avm/res/key-vault/vault:0.1.1' = { name: '${uniqueString(deployment().name, location)}-test-kvvpe' params: { // Required parameters @@ -631,7 +631,7 @@ This instance deploys the module in alignment with the best-practices of the Wel via Bicep module ```bicep -module vault 'br/public:avm-res-keyvault-vault:1.0.0' = { +module vault 'br/public:avm/res/key-vault/vault:0.1.1' = { name: '${uniqueString(deployment().name, location)}-test-kvvwaf' params: { // Required parameters @@ -1283,7 +1283,14 @@ Whether or not public network access is allowed for this resource. For security - Required: No - Type: string - Default: `''` -- Allowed: `['', Disabled, Enabled]` +- Allowed: + ```Bicep + [ + '' + 'Disabled' + 'Enabled' + ] + ``` ### Parameter: `roleAssignments` @@ -1365,7 +1372,13 @@ Specifies the SKU for the vault. - Required: No - Type: string - Default: `'premium'` -- Allowed: `[premium, standard]` +- Allowed: + ```Bicep + [ + 'premium' + 'standard' + ] + ``` ### Parameter: `softDeleteRetentionInDays` diff --git a/avm/res/key-vault/vault/key/README.md b/avm/res/key-vault/vault/key/README.md index 1da5d09f49..9e9e56a4cb 100644 --- a/avm/res/key-vault/vault/key/README.md +++ b/avm/res/key-vault/vault/key/README.md @@ -70,14 +70,33 @@ The elliptic curve name. - Required: No - Type: string - Default: `'P-256'` -- Allowed: `[P-256, P-256K, P-384, P-521]` +- Allowed: + ```Bicep + [ + 'P-256' + 'P-256K' + 'P-384' + 'P-521' + ] + ``` ### Parameter: `keyOps` Array of JsonWebKeyOperation. - Required: No - Type: array -- Allowed: `[decrypt, encrypt, import, sign, unwrapKey, verify, wrapKey]` +- Allowed: + ```Bicep + [ + 'decrypt' + 'encrypt' + 'import' + 'sign' + 'unwrapKey' + 'verify' + 'wrapKey' + ] + ``` ### Parameter: `keySize` @@ -97,7 +116,15 @@ The type of the key. - Required: No - Type: string - Default: `'EC'` -- Allowed: `[EC, EC-HSM, RSA, RSA-HSM]` +- Allowed: + ```Bicep + [ + 'EC' + 'EC-HSM' + 'RSA' + 'RSA-HSM' + ] + ``` ### Parameter: `name` diff --git a/avm/res/kubernetes-configuration/extension/ORPHANED.md b/avm/res/kubernetes-configuration/extension/ORPHANED.md deleted file mode 100644 index ef8fa911d2..0000000000 --- a/avm/res/kubernetes-configuration/extension/ORPHANED.md +++ /dev/null @@ -1,4 +0,0 @@ -⚠️THIS MODULE IS CURRENTLY ORPHANED.⚠️ - -- Only security and bug fixes are being handled by the AVM core team at present. -- If interested in becoming the module owner of this orphaned module (must be Microsoft FTE), please look for the related "orphaned module" GitHub issue [here](https://aka.ms/AVM/OrphanedModules)! \ No newline at end of file diff --git a/avm/res/kubernetes-configuration/extension/README.md b/avm/res/kubernetes-configuration/extension/README.md index 5b28fa05b5..0f348aaa0d 100644 --- a/avm/res/kubernetes-configuration/extension/README.md +++ b/avm/res/kubernetes-configuration/extension/README.md @@ -1,10 +1,5 @@ # Kubernetes Configuration Extensions `[Microsoft.KubernetesConfiguration/extensions]` -> ⚠️THIS MODULE IS CURRENTLY ORPHANED.⚠️ -> -> - Only security and bug fixes are being handled by the AVM core team at present. -> - If interested in becoming the module owner of this orphaned module (must be Microsoft FTE), please look for the related "orphaned module" GitHub issue [here](https://aka.ms/AVM/OrphanedModules)! - This module deploys a Kubernetes Configuration Extension. ## Navigation @@ -29,7 +24,7 @@ The following section provides usage examples for the module, which were used to >**Note**: Each example lists all the required parameters first, followed by the rest - each in alphabetical order. ->**Note**: To reference the module, please use the following syntax `br/public:avm-res-kubernetesconfiguration-extension:1.0.0`. +>**Note**: To reference the module, please use the following syntax `br/public:avm/res/kubernetes-configuration/extension:0.1.1`. - [Using only defaults](#example-1-using-only-defaults) - [Using large parameter set](#example-2-using-large-parameter-set) @@ -47,7 +42,7 @@ This instance deploys the module with the minimum set of required parameters. via Bicep module ```bicep -module extension 'br/public:avm-res-kubernetesconfiguration-extension:1.0.0' = { +module extension 'br/public:avm/res/kubernetes-configuration/extension:0.1.1' = { name: '${uniqueString(deployment().name, location)}-test-kcemin' params: { // Required parameters @@ -131,7 +126,7 @@ This instance deploys the module with most of its features enabled. via Bicep module ```bicep -module extension 'br/public:avm-res-kubernetesconfiguration-extension:1.0.0' = { +module extension 'br/public:avm/res/kubernetes-configuration/extension:0.1.1' = { name: '${uniqueString(deployment().name, location)}-test-kcemax' params: { // Required parameters @@ -255,7 +250,7 @@ This instance deploys the module in alignment with the best-practices of the Azu via Bicep module ```bicep -module extension 'br/public:avm-res-kubernetesconfiguration-extension:1.0.0' = { +module extension 'br/public:avm/res/kubernetes-configuration/extension:0.1.1' = { name: '${uniqueString(deployment().name, location)}-test-kcewaf' params: { // Required parameters diff --git a/avm/res/kubernetes-configuration/flux-configuration/ORPHANED.md b/avm/res/kubernetes-configuration/flux-configuration/ORPHANED.md deleted file mode 100644 index ef8fa911d2..0000000000 --- a/avm/res/kubernetes-configuration/flux-configuration/ORPHANED.md +++ /dev/null @@ -1,4 +0,0 @@ -⚠️THIS MODULE IS CURRENTLY ORPHANED.⚠️ - -- Only security and bug fixes are being handled by the AVM core team at present. -- If interested in becoming the module owner of this orphaned module (must be Microsoft FTE), please look for the related "orphaned module" GitHub issue [here](https://aka.ms/AVM/OrphanedModules)! \ No newline at end of file diff --git a/avm/res/kubernetes-configuration/flux-configuration/README.md b/avm/res/kubernetes-configuration/flux-configuration/README.md index 3eb0a700e9..1a386d9467 100644 --- a/avm/res/kubernetes-configuration/flux-configuration/README.md +++ b/avm/res/kubernetes-configuration/flux-configuration/README.md @@ -1,10 +1,5 @@ # Kubernetes Configuration Flux Configurations `[Microsoft.KubernetesConfiguration/fluxConfigurations]` -> ⚠️THIS MODULE IS CURRENTLY ORPHANED.⚠️ -> -> - Only security and bug fixes are being handled by the AVM core team at present. -> - If interested in becoming the module owner of this orphaned module (must be Microsoft FTE), please look for the related "orphaned module" GitHub issue [here](https://aka.ms/AVM/OrphanedModules)! - This module deploys a Kubernetes Configuration Flux Configuration. ## Navigation @@ -28,7 +23,7 @@ The following section provides usage examples for the module, which were used to >**Note**: Each example lists all the required parameters first, followed by the rest - each in alphabetical order. ->**Note**: To reference the module, please use the following syntax `br/public:avm-res-kubernetesconfiguration-fluxconfiguration:1.0.0`. +>**Note**: To reference the module, please use the following syntax `br/public:avm/res/kubernetes-configuration/flux-configuration:0.2.0`. - [Using only defaults](#example-1-using-only-defaults) - [Using large parameter set](#example-2-using-large-parameter-set) @@ -46,7 +41,7 @@ This instance deploys the module with the minimum set of required parameters. via Bicep module ```bicep -module fluxConfiguration 'br/public:avm-res-kubernetesconfiguration-fluxconfiguration:1.0.0' = { +module fluxConfiguration 'br/public:avm/res/kubernetes-configuration/flux-configuration:0.2.0' = { name: '${uniqueString(deployment().name, location)}-test-kcfcmin' params: { // Required parameters @@ -138,7 +133,7 @@ This instance deploys the module with most of its features enabled. via Bicep module ```bicep -module fluxConfiguration 'br/public:avm-res-kubernetesconfiguration-fluxconfiguration:1.0.0' = { +module fluxConfiguration 'br/public:avm/res/kubernetes-configuration/flux-configuration:0.2.0' = { name: '${uniqueString(deployment().name, location)}-test-kcfcmax' params: { // Required parameters @@ -248,7 +243,7 @@ This instance deploys the module in alignment with the best-practices of the Azu via Bicep module ```bicep -module fluxConfiguration 'br/public:avm-res-kubernetesconfiguration-fluxconfiguration:1.0.0' = { +module fluxConfiguration 'br/public:avm/res/kubernetes-configuration/flux-configuration:0.2.0' = { name: '${uniqueString(deployment().name, location)}-test-kcfcwaf' params: { // Required parameters @@ -439,14 +434,26 @@ The namespace to which this configuration is installed to. Maximum of 253 lower Scope at which the configuration will be installed. - Required: Yes - Type: string -- Allowed: `[cluster, namespace]` +- Allowed: + ```Bicep + [ + 'cluster' + 'namespace' + ] + ``` ### Parameter: `sourceKind` Source Kind to pull the configuration data from. - Required: Yes - Type: string -- Allowed: `[Bucket, GitRepository]` +- Allowed: + ```Bicep + [ + 'Bucket' + 'GitRepository' + ] + ``` ### Parameter: `suspend` diff --git a/avm/res/kubernetes-configuration/flux-configuration/main.json b/avm/res/kubernetes-configuration/flux-configuration/main.json index dddbc16934..0357aacdcf 100644 --- a/avm/res/kubernetes-configuration/flux-configuration/main.json +++ b/avm/res/kubernetes-configuration/flux-configuration/main.json @@ -5,8 +5,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.22.6.54827", - "templateHash": "8142453295903624237" + "version": "0.23.1.45101", + "templateHash": "13420454476526931427" }, "name": "Kubernetes Configuration Flux Configurations", "description": "This module deploys a Kubernetes Configuration Flux Configuration.", diff --git a/avm/res/kubernetes-configuration/flux-configuration/version.json b/avm/res/kubernetes-configuration/flux-configuration/version.json index 83083db694..1c035df49f 100644 --- a/avm/res/kubernetes-configuration/flux-configuration/version.json +++ b/avm/res/kubernetes-configuration/flux-configuration/version.json @@ -1,6 +1,6 @@ { "$schema": "https://aka.ms/bicep-registry-module-version-file-schema#", - "version": "0.1", + "version": "0.2", "pathFilters": [ "./main.json" ] diff --git a/avm/res/network/dns-forwarding-ruleset/README.md b/avm/res/network/dns-forwarding-ruleset/README.md index 10042ee0d6..636f4c5ac5 100644 --- a/avm/res/network/dns-forwarding-ruleset/README.md +++ b/avm/res/network/dns-forwarding-ruleset/README.md @@ -26,7 +26,7 @@ The following section provides usage examples for the module, which were used to >**Note**: Each example lists all the required parameters first, followed by the rest - each in alphabetical order. ->**Note**: To reference the module, please use the following syntax `br/public:avm-res-network-dnsforwardingruleset:1.0.0`. +>**Note**: To reference the module, please use the following syntax `br/public:avm/res/network/dns-forwarding-ruleset:0.1.1`. - [Using only defaults](#example-1-using-only-defaults) - [Using large parameter set](#example-2-using-large-parameter-set) @@ -44,7 +44,7 @@ This instance deploys the module with the minimum set of required parameters. via Bicep module ```bicep -module dnsForwardingRuleset 'br/public:avm-res-network-dnsforwardingruleset:1.0.0' = { +module dnsForwardingRuleset 'br/public:avm/res/network/dns-forwarding-ruleset:0.1.1' = { name: '${uniqueString(deployment().name, location)}-test-ndfrsmin' params: { // Required parameters @@ -120,7 +120,7 @@ This instance deploys the module with most of its features enabled. via Bicep module ```bicep -module dnsForwardingRuleset 'br/public:avm-res-network-dnsforwardingruleset:1.0.0' = { +module dnsForwardingRuleset 'br/public:avm/res/network/dns-forwarding-ruleset:0.1.1' = { name: '${uniqueString(deployment().name, location)}-test-ndfrsmax' params: { // Required parameters @@ -250,7 +250,7 @@ This instance deploys the module in alignment with the best-practices of the Azu via Bicep module ```bicep -module dnsForwardingRuleset 'br/public:avm-res-network-dnsforwardingruleset:1.0.0' = { +module dnsForwardingRuleset 'br/public:avm/res/network/dns-forwarding-ruleset:0.1.1' = { name: '${uniqueString(deployment().name, location)}-test-ndfrswaf' params: { // Required parameters diff --git a/avm/res/network/dns-resolver/README.md b/avm/res/network/dns-resolver/README.md index a7ee7637c6..7ca859bb39 100644 --- a/avm/res/network/dns-resolver/README.md +++ b/avm/res/network/dns-resolver/README.md @@ -26,7 +26,7 @@ The following section provides usage examples for the module, which were used to >**Note**: Each example lists all the required parameters first, followed by the rest - each in alphabetical order. ->**Note**: To reference the module, please use the following syntax `br/public:avm-res-network-dnsresolver:1.0.0`. +>**Note**: To reference the module, please use the following syntax `br/public:avm/res/network/dns-resolver:0.1.1`. - [Using only defaults](#example-1-using-only-defaults) - [Using large parameter set](#example-2-using-large-parameter-set) @@ -44,7 +44,7 @@ This instance deploys the module with the minimum set of required parameters. via Bicep module ```bicep -module dnsResolver 'br/public:avm-res-network-dnsresolver:1.0.0' = { +module dnsResolver 'br/public:avm/res/network/dns-resolver:0.1.1' = { name: '${uniqueString(deployment().name, location)}-test-ndrmin' params: { // Required parameters @@ -116,7 +116,7 @@ This instance deploys the module with most of its features enabled. via Bicep module ```bicep -module dnsResolver 'br/public:avm-res-network-dnsresolver:1.0.0' = { +module dnsResolver 'br/public:avm/res/network/dns-resolver:0.1.1' = { name: '${uniqueString(deployment().name, location)}-test-ndrmax' params: { // Required parameters @@ -234,7 +234,7 @@ This instance deploys the module in alignment with the best-practices of the Azu via Bicep module ```bicep -module dnsResolver 'br/public:avm-res-network-dnsresolver:1.0.0' = { +module dnsResolver 'br/public:avm/res/network/dns-resolver:0.1.1' = { name: '${uniqueString(deployment().name, location)}-test-ndrwaf' params: { // Required parameters diff --git a/avm/res/network/dns-zone/README.md b/avm/res/network/dns-zone/README.md index 68a325f627..c266d8dda0 100644 --- a/avm/res/network/dns-zone/README.md +++ b/avm/res/network/dns-zone/README.md @@ -34,7 +34,7 @@ The following section provides usage examples for the module, which were used to >**Note**: Each example lists all the required parameters first, followed by the rest - each in alphabetical order. ->**Note**: To reference the module, please use the following syntax `br/public:avm-res-network-dnszone:1.0.0`. +>**Note**: To reference the module, please use the following syntax `br/public:avm/res/network/dns-zone:0.1.1`. - [Using only defaults](#example-1-using-only-defaults) - [Using large parameter set](#example-2-using-large-parameter-set) @@ -50,7 +50,7 @@ This instance deploys the module with the minimum set of required parameters. via Bicep module ```bicep -module dnsZone 'br/public:avm-res-network-dnszone:1.0.0' = { +module dnsZone 'br/public:avm/res/network/dns-zone:0.1.1' = { name: '${uniqueString(deployment().name, location)}-test-ndzmin' params: { // Required parameters @@ -150,7 +150,7 @@ This instance deploys the module with most of its features enabled. via Bicep module ```bicep -module dnsZone 'br/public:avm-res-network-dnszone:1.0.0' = { +module dnsZone 'br/public:avm/res/network/dns-zone:0.1.1' = { name: '${uniqueString(deployment().name, location)}-test-ndzmax' params: { // Required parameters @@ -550,7 +550,7 @@ This instance deploys the module in alignment with the best-practices of the Wel via Bicep module ```bicep -module dnsZone 'br/public:avm-res-network-dnszone:1.0.0' = { +module dnsZone 'br/public:avm/res/network/dns-zone:0.1.1' = { name: '${uniqueString(deployment().name, location)}-test-ndzwaf' params: { // Required parameters diff --git a/avm/res/network/network-interface/README.md b/avm/res/network/network-interface/README.md index 15a8aa92c9..d8c3e724be 100644 --- a/avm/res/network/network-interface/README.md +++ b/avm/res/network/network-interface/README.md @@ -25,7 +25,7 @@ The following section provides usage examples for the module, which were used to >**Note**: Each example lists all the required parameters first, followed by the rest - each in alphabetical order. ->**Note**: To reference the module, please use the following syntax `br/public:avm-res-network-networkinterface:1.0.0`. +>**Note**: To reference the module, please use the following syntax `br/public:avm/res/network/network-interface:0.1.1`. - [Using only defaults](#example-1-using-only-defaults) - [Using large parameter set](#example-2-using-large-parameter-set) @@ -41,7 +41,7 @@ This instance deploys the module with the minimum set of required parameters. via Bicep module ```bicep -module networkInterface 'br/public:avm-res-network-networkinterface:1.0.0' = { +module networkInterface 'br/public:avm/res/network/network-interface:0.1.1' = { name: '${uniqueString(deployment().name, location)}-test-nnimin' params: { // Required parameters @@ -119,7 +119,7 @@ This instance deploys the module with most of its features enabled. via Bicep module ```bicep -module networkInterface 'br/public:avm-res-network-networkinterface:1.0.0' = { +module networkInterface 'br/public:avm/res/network/network-interface:0.1.1' = { name: '${uniqueString(deployment().name, location)}-test-nnimax' params: { // Required parameters @@ -275,7 +275,7 @@ This instance deploys the module in alignment with the best-practices of the Wel via Bicep module ```bicep -module networkInterface 'br/public:avm-res-network-networkinterface:1.0.0' = { +module networkInterface 'br/public:avm/res/network/network-interface:0.1.1' = { name: '${uniqueString(deployment().name, location)}-test-nniwaf' params: { // Required parameters @@ -429,7 +429,14 @@ Auxiliary mode of Network Interface resource. Not all regions are enabled for Au - Required: No - Type: string - Default: `'None'` -- Allowed: `[Floating, MaxConnections, None]` +- Allowed: + ```Bicep + [ + 'Floating' + 'MaxConnections' + 'None' + ] + ``` ### Parameter: `auxiliarySku` @@ -437,7 +444,16 @@ Auxiliary sku of Network Interface resource. Not all regions are enabled for Aux - Required: No - Type: string - Default: `'None'` -- Allowed: `[A1, A2, A4, A8, None]` +- Allowed: + ```Bicep + [ + 'A1' + 'A2' + 'A4' + 'A8' + 'None' + ] + ``` ### Parameter: `diagnosticSettings` diff --git a/avm/res/network/private-dns-zone/README.md b/avm/res/network/private-dns-zone/README.md index 3f7e35cbda..d90a50303b 100644 --- a/avm/res/network/private-dns-zone/README.md +++ b/avm/res/network/private-dns-zone/README.md @@ -33,7 +33,7 @@ The following section provides usage examples for the module, which were used to >**Note**: Each example lists all the required parameters first, followed by the rest - each in alphabetical order. ->**Note**: To reference the module, please use the following syntax `br/public:avm-res-network-privatednszone:1.0.0`. +>**Note**: To reference the module, please use the following syntax `br/public:avm/res/network/private-dns-zone:0.1.1`. - [Using only defaults](#example-1-using-only-defaults) - [Using large parameter set](#example-2-using-large-parameter-set) @@ -51,7 +51,7 @@ This instance deploys the module with the minimum set of required parameters. via Bicep module ```bicep -module privateDnsZone 'br/public:avm-res-network-privatednszone:1.0.0' = { +module privateDnsZone 'br/public:avm/res/network/private-dns-zone:0.1.1' = { name: '${uniqueString(deployment().name, location)}-test-npdzmin' params: { // Required parameters @@ -143,7 +143,7 @@ This instance deploys the module with most of its features enabled. via Bicep module ```bicep -module privateDnsZone 'br/public:avm-res-network-privatednszone:1.0.0' = { +module privateDnsZone 'br/public:avm/res/network/private-dns-zone:0.1.1' = { name: '${uniqueString(deployment().name, location)}-test-npdzmax' params: { // Required parameters @@ -549,7 +549,7 @@ This instance deploys the module in alignment with the best-practices of the Wel via Bicep module ```bicep -module privateDnsZone 'br/public:avm-res-network-privatednszone:1.0.0' = { +module privateDnsZone 'br/public:avm/res/network/private-dns-zone:0.1.1' = { name: '${uniqueString(deployment().name, location)}-test-npdzwaf' params: { // Required parameters @@ -574,12 +574,6 @@ module privateDnsZone 'br/public:avm-res-network-privatednszone:1.0.0' = { Role: 'DeploymentValidation' } txt: [] - virtualNetworkLinks: [ - { - registrationEnabled: true - virtualNetworkResourceId: '' - } - ] } } ``` @@ -643,14 +637,6 @@ module privateDnsZone 'br/public:avm-res-network-privatednszone:1.0.0' = { }, "txt": { "value": [] - }, - "virtualNetworkLinks": { - "value": [ - { - "registrationEnabled": true, - "virtualNetworkResourceId": "" - } - ] } } } diff --git a/avm/res/network/private-dns-zone/cname/README.md b/avm/res/network/private-dns-zone/cname/README.md index cee461a947..de536f01bf 100644 --- a/avm/res/network/private-dns-zone/cname/README.md +++ b/avm/res/network/private-dns-zone/cname/README.md @@ -44,7 +44,7 @@ This module deploys a Private DNS Zone CNAME record. A CNAME record. - Required: No - Type: object -- Default: `{object}` +- Default: `{}` ### Parameter: `metadata` diff --git a/avm/res/network/private-endpoint/README.md b/avm/res/network/private-endpoint/README.md index 0f8b2df8e5..abc80d4a20 100644 --- a/avm/res/network/private-endpoint/README.md +++ b/avm/res/network/private-endpoint/README.md @@ -25,7 +25,7 @@ The following section provides usage examples for the module, which were used to >**Note**: Each example lists all the required parameters first, followed by the rest - each in alphabetical order. ->**Note**: To reference the module, please use the following syntax `br/public:avm-res-network-privateendpoint:1.0.0`. +>**Note**: To reference the module, please use the following syntax `br/public:avm/res/network/private-endpoint:0.2.0`. - [Using only defaults](#example-1-using-only-defaults) - [Using large parameter set](#example-2-using-large-parameter-set) @@ -43,7 +43,7 @@ This instance deploys the module with the minimum set of required parameters. via Bicep module ```bicep -module privateEndpoint 'br/public:avm-res-network-privateendpoint:1.0.0' = { +module privateEndpoint 'br/public:avm/res/network/private-endpoint:0.2.0' = { name: '${uniqueString(deployment().name, location)}-test-npemin' params: { // Required parameters @@ -147,7 +147,7 @@ This instance deploys the module with most of its features enabled. via Bicep module ```bicep -module privateEndpoint 'br/public:avm-res-network-privateendpoint:1.0.0' = { +module privateEndpoint 'br/public:avm/res/network/private-endpoint:0.2.0' = { name: '${uniqueString(deployment().name, location)}-test-npemax' params: { // Required parameters @@ -303,7 +303,7 @@ This instance deploys the module in alignment with the best-practices of the Wel via Bicep module ```bicep -module privateEndpoint 'br/public:avm-res-network-privateendpoint:1.0.0' = { +module privateEndpoint 'br/public:avm/res/network/private-endpoint:0.2.0' = { name: '${uniqueString(deployment().name, location)}-test-npewaf' params: { // Required parameters diff --git a/avm/res/network/private-endpoint/main.bicep b/avm/res/network/private-endpoint/main.bicep index 9955227238..2c5fa720ab 100644 --- a/avm/res/network/private-endpoint/main.bicep +++ b/avm/res/network/private-endpoint/main.bicep @@ -165,7 +165,7 @@ type roleAssignmentType = { principalId: string @description('Optional. The principal type of the assigned principal ID.') - principalType: ('ServicePrincipal' | 'Group' | 'User' | 'ForeignGroup' | 'Device' | null)? + principalType: ('ServicePrincipal' | 'Group' | 'User' | 'ForeignGroup' | 'Device')? @description('Optional. The description of the role assignment.') description: string? diff --git a/avm/res/network/private-endpoint/main.json b/avm/res/network/private-endpoint/main.json index d0d8b2fe71..f345888eb2 100644 --- a/avm/res/network/private-endpoint/main.json +++ b/avm/res/network/private-endpoint/main.json @@ -5,8 +5,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.21.1.54444", - "templateHash": "13152465847704433697" + "version": "0.23.1.45101", + "templateHash": "2788827530274342759" }, "name": "Private Endpoints", "description": "This module deploys a Private Endpoint.", @@ -345,8 +345,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.21.1.54444", - "templateHash": "1698104586574073002" + "version": "0.23.1.45101", + "templateHash": "18168683629401652671" }, "name": "Private Endpoint Private DNS Zone Groups", "description": "This module deploys a Private Endpoint Private DNS Zone Group.", diff --git a/avm/res/network/private-endpoint/private-dns-zone-group/main.json b/avm/res/network/private-endpoint/private-dns-zone-group/main.json index f1c059b02a..1ace60b310 100644 --- a/avm/res/network/private-endpoint/private-dns-zone-group/main.json +++ b/avm/res/network/private-endpoint/private-dns-zone-group/main.json @@ -4,8 +4,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.21.1.54444", - "templateHash": "1698104586574073002" + "version": "0.23.1.45101", + "templateHash": "18168683629401652671" }, "name": "Private Endpoint Private DNS Zone Groups", "description": "This module deploys a Private Endpoint Private DNS Zone Group.", diff --git a/avm/res/network/private-endpoint/version.json b/avm/res/network/private-endpoint/version.json index 7fa401bdf7..9481fea58e 100644 --- a/avm/res/network/private-endpoint/version.json +++ b/avm/res/network/private-endpoint/version.json @@ -1,6 +1,6 @@ { "$schema": "https://aka.ms/bicep-registry-module-version-file-schema#", - "version": "0.1", + "version": "0.2", "pathFilters": [ "./main.json" ] diff --git a/avm/res/network/public-ip-address/README.md b/avm/res/network/public-ip-address/README.md index 6c0a17b265..5139ea103d 100644 --- a/avm/res/network/public-ip-address/README.md +++ b/avm/res/network/public-ip-address/README.md @@ -25,7 +25,7 @@ The following section provides usage examples for the module, which were used to >**Note**: Each example lists all the required parameters first, followed by the rest - each in alphabetical order. ->**Note**: To reference the module, please use the following syntax `br/public:avm-res-network-publicipaddress:1.0.0`. +>**Note**: To reference the module, please use the following syntax `br/public:avm/res/network/public-ip-address:0.1.1`. - [Using only defaults](#example-1-using-only-defaults) - [Using large parameter set](#example-2-using-large-parameter-set) @@ -43,7 +43,7 @@ This instance deploys the module with the minimum set of required parameters. via Bicep module ```bicep -module publicIpAddress 'br/public:avm-res-network-publicipaddress:1.0.0' = { +module publicIpAddress 'br/public:avm/res/network/public-ip-address:0.1.1' = { name: '${uniqueString(deployment().name, location)}-test-npiamin' params: { // Required parameters @@ -123,7 +123,7 @@ This instance deploys the module with most of its features enabled. via Bicep module ```bicep -module publicIpAddress 'br/public:avm-res-network-publicipaddress:1.0.0' = { +module publicIpAddress 'br/public:avm/res/network/public-ip-address:0.1.1' = { name: '${uniqueString(deployment().name, location)}-test-npiamax' params: { // Required parameters @@ -269,7 +269,7 @@ This instance deploys the module in alignment with the best-practices of the Azu via Bicep module ```bicep -module publicIpAddress 'br/public:avm-res-network-publicipaddress:1.0.0' = { +module publicIpAddress 'br/public:avm/res/network/public-ip-address:0.1.1' = { name: '${uniqueString(deployment().name, location)}-test-npiawaf' params: { // Required parameters @@ -437,7 +437,7 @@ module publicIpAddress 'br/public:avm-res-network-publicipaddress:1.0.0' = { ### Parameter: `ddosSettings` The DDoS protection plan configuration associated with the public IP address. -- Required: Yes +- Required: No - Type: object @@ -453,6 +453,15 @@ Required. The DDoS protection plan ID associated with the public IP address. - Required: Yes - Type: object +| Name | Required | Type | Description | +| :-- | :-- | :--| :-- | +| [`id`](#parameter-ddossettingsddosprotectionplanid) | Yes | string | | + +### Parameter: `ddosSettings.ddosProtectionPlan.id` +- Required: Yes +- Type: string + + ### Parameter: `ddosSettings.protectionMode` Required. The DDoS protection policy customizations. @@ -579,7 +588,7 @@ Optional. Resource ID of the diagnostic log analytics workspace. For security re ### Parameter: `dnsSettings` The DNS settings of the public IP address. -- Required: Yes +- Required: No - Type: object @@ -679,7 +688,13 @@ IP address version. - Required: No - Type: string - Default: `'IPv4'` -- Allowed: `[IPv4, IPv6]` +- Allowed: + ```Bicep + [ + 'IPv4' + 'IPv6' + ] + ``` ### Parameter: `publicIPAllocationMethod` @@ -687,7 +702,13 @@ The public IP address allocation method. - Required: No - Type: string - Default: `'Static'` -- Allowed: `[Dynamic, Static]` +- Allowed: + ```Bicep + [ + 'Dynamic' + 'Static' + ] + ``` ### Parameter: `publicIpPrefixResourceId` @@ -769,7 +790,13 @@ Name of a public IP address SKU. - Required: No - Type: string - Default: `'Standard'` -- Allowed: `[Basic, Standard]` +- Allowed: + ```Bicep + [ + 'Basic' + 'Standard' + ] + ``` ### Parameter: `skuTier` @@ -777,7 +804,13 @@ Tier of a public IP address SKU. - Required: No - Type: string - Default: `'Regional'` -- Allowed: `[Global, Regional]` +- Allowed: + ```Bicep + [ + 'Global' + 'Regional' + ] + ``` ### Parameter: `tags` diff --git a/avm/utilities/pipelines/publish/Publish-ModuleFromPathToPBR.ps1 b/avm/utilities/pipelines/publish/Publish-ModuleFromPathToPBR.ps1 index 6db4eadc0a..1f5fc4a5c0 100644 --- a/avm/utilities/pipelines/publish/Publish-ModuleFromPathToPBR.ps1 +++ b/avm/utilities/pipelines/publish/Publish-ModuleFromPathToPBR.ps1 @@ -93,5 +93,7 @@ function Publish-ModuleFromPathToPBR { '--force' ) # TODO move to its own task to show that as skipped if no file qualifies for new version + Write-Verbose "Publish Input:`n $($publishInput | ConvertTo-Json -Depth 10)" -Verbose + bicep publish @publishInput } diff --git a/avm/utilities/pipelines/publish/helper/Get-BRMRepositoryName.ps1 b/avm/utilities/pipelines/publish/helper/Get-BRMRepositoryName.ps1 index f58cf2d4e8..5c96743a75 100644 --- a/avm/utilities/pipelines/publish/helper/Get-BRMRepositoryName.ps1 +++ b/avm/utilities/pipelines/publish/helper/Get-BRMRepositoryName.ps1 @@ -11,7 +11,7 @@ Mandatory. The template file path to convert .EXAMPLE Get-BRMRepositoryName -TemplateFilePath 'C:\avm\res\key-vault\vault\main.bicep' -Convert 'C:\avm\res\key-vault\vault\main.bicep' to e.g. 'avm-res-keyvault-vault' +Convert 'C:\avm\res\key-vault\vault\main.bicep' to e.g. 'avm/res/key-vault/vault' #> function Get-BRMRepositoryName { @@ -21,8 +21,6 @@ function Get-BRMRepositoryName { [string] $TemplateFilePath ) - $moduleIdentifier = ((Split-Path $TemplateFilePath -Parent) -split '[\/|\\]avm[\/|\\]')[-1] - $formattedModuleIdentifier = ($moduleIdentifier -replace '-', '') -replace '[\/|\\]', '-' - - return "avm-$formattedModuleIdentifier" + $moduleIdentifier = (Split-Path $TemplateFilePath -Parent) -split '[\/|\\](avm[\/|\\])' + return ($moduleIdentifier[1, 2] -join '') -replace '\\', '/' } diff --git a/avm/utilities/pipelines/publish/helper/Get-ModuleTargetPatchVersion.ps1 b/avm/utilities/pipelines/publish/helper/Get-ModuleTargetPatchVersion.ps1 index a997d63973..42f8c2c45c 100644 --- a/avm/utilities/pipelines/publish/helper/Get-ModuleTargetPatchVersion.ps1 +++ b/avm/utilities/pipelines/publish/helper/Get-ModuleTargetPatchVersion.ps1 @@ -40,15 +40,14 @@ function Get-ModuleTargetPatchVersion { $ModuleRelativeFolderPath = ("avm/{0}" -f ($ModuleFolderPath -split '[\/|\\]avm[\/|\\]')[-1]) -replace '\\', '/' - # Get all released module tags - $existingTagList = git ls-remote --tag origin "$ModuleRelativeFolderPath/$MajMinVersion*" + # Get all released module tags (using upstream specifically to work in forks) + $existingTagList = git ls-remote --tag 'https://github.com/Azure/bicep-registry-modules.git' "$ModuleRelativeFolderPath/$MajMinVersion*" if ( $existingTagList.count -eq 0 ) { # If first module tag, reset patch Write-Verbose "No existing tag for module [$ModuleRelativeFolderPath] starting with version [$MajMinVersion]" -Verbose Write-Verbose "Setting patch version to 0" -Verbose $patch = 0 - } - else { + } else { # Otherwise get latest patch $patchList = $existingTagList | ForEach-Object { [int](($_ -split '\.')[-1]) } $latestPatch = ($patchList | Measure-Object -Maximum).Maximum diff --git a/avm/utilities/pipelines/publish/helper/Get-ModuleVersionChange.ps1 b/avm/utilities/pipelines/publish/helper/Get-ModuleVersionChange.ps1 index b8b739302c..fc8458c772 100644 --- a/avm/utilities/pipelines/publish/helper/Get-ModuleVersionChange.ps1 +++ b/avm/utilities/pipelines/publish/helper/Get-ModuleVersionChange.ps1 @@ -43,16 +43,11 @@ function Get-ModuleVersionChange { $newVersion = (New-Object System.Version($matches[1], $matches[2])) } - Write-Verbose "The old version is [$oldVersion]" -Verbose - Write-Verbose "The new version is [$newVersion]" -Verbose - if ($newVersion -lt $oldVersion) { Write-Verbose "The new version is smaller than the old version" - } - elseif ($newVersion -eq $oldVersion) { + } elseif ($newVersion -eq $oldVersion) { Write-Verbose "The new version equals the old version" - } - else { + } else { Write-Verbose "The new version is greater than the old version" } diff --git a/avm/utilities/pipelines/sharedScripts/Set-ModuleReadMe.ps1 b/avm/utilities/pipelines/sharedScripts/Set-ModuleReadMe.ps1 index 3f3efc1535..1b5f8ce429 100644 --- a/avm/utilities/pipelines/sharedScripts/Set-ModuleReadMe.ps1 +++ b/avm/utilities/pipelines/sharedScripts/Set-ModuleReadMe.ps1 @@ -226,39 +226,64 @@ function Set-ParametersSection { # 3. Add individual parameters foreach ($parameter in $categoryParameters) { + + $isRequired = Get-IsParameterRequired -TemplateFileContent $TemplateFileContent -Parameter $parameter + + # Default values + if ($parameter.defaultValue -is [array]) { + if ($parameter.defaultValue.count -eq 0) { + $defaultValue = '[]' + } else { + $bicepJSONDefaultParameterObject = @{ $parameter.name = ($parameter.defaultValue ?? @()) } # Wrapping on object to work with formatted Bicep script + $bicepRawformattedDefault = ConvertTo-FormattedBicep -JSONParameters $bicepJSONDefaultParameterObject + $leadingSpacesToTrim = ($bicepRawformattedDefault -match '^(\s+).+') ? $matches[1].Length : 0 + $bicepCleanedFormattedDefault = $bicepRawformattedDefault -replace ('{0}: ' -f $parameter.name) # Unwrapping the object + $defaultValue = $bicepCleanedFormattedDefault -split '\n' | ForEach-Object { $_ -replace "^\s{$leadingSpacesToTrim}" } # Removing excess leading spaces + } + } elseif ($parameter.defaultValue -is [hashtable]) { + if ($parameter.defaultValue.count -eq 0) { + $defaultValue = '{}' + } else { + $bicepDefaultValue = ConvertTo-FormattedBicep -JSONParameters $parameter.defaultValue + $defaultValue = "{`n$bicepDefaultValue`n}" + } + } elseif ($parameter.defaultValue -is [string] -and ($parameter.defaultValue -notmatch '\[\w+\(.*\).*\]')) { + $defaultValue = '''' + $parameter.defaultValue + '''' + } else { + $defaultValue = $parameter.defaultValue + } + # User defined type if ($null -eq $parameter.type -and $parameter.ContainsKey('$ref')) { $identifier = Split-Path $parameter.'$ref' -Leaf $definition = $TemplateFileContent.definitions[$identifier] - $type = $definition['type'] - $isRequired = (-not $definition['nullable']) - $defaultValue = $null $rawAllowedValues = $definition['allowedValues'] } else { $type = $parameter.type - - if ($parameter.defaultValue -is [array]) { - $defaultValue = '[{0}]' -f (($parameter.defaultValue | Sort-Object) -join ', ') - } elseif ($parameter.defaultValue -is [hashtable]) { - $defaultValue = '{object}' - } elseif ($parameter.defaultValue -is [string] -and ($parameter.defaultValue -notmatch '\[\w+\(.*\).*\]')) { - $defaultValue = '''' + $parameter.defaultValue + '''' - } else { - $defaultValue = $parameter.defaultValue - } - - $isRequired = Get-IsParameterRequired -TemplateFileContent $TemplateFileContent -Parameter $parameter $rawAllowedValues = $parameter.allowedValues } + # Allowed values + if ($rawAllowedValues -is [array]) { + $bicepJSONAllowedParameterObject = @{ $parameter.name = ($rawAllowedValues ?? @()) } # Wrapping on object to work with formatted Bicep script + $bicepRawformattedAllowed = ConvertTo-FormattedBicep -JSONParameters $bicepJSONAllowedParameterObject + $leadingSpacesToTrim = ($bicepRawformattedAllowed -match '^(\s+).+') ? $matches[1].Length : 0 + $bicepCleanedFormattedAllowed = $bicepRawformattedAllowed -replace ('{0}: ' -f $parameter.name) # Unwrapping the object + $allowedValues = $bicepCleanedFormattedAllowed -split '\n' | ForEach-Object { $_ -replace "^\s{$leadingSpacesToTrim}" } # Removing excess leading spaces + } elseif ($rawAllowedValues -is [hashtable]) { + $bicepAllowedValues = ConvertTo-FormattedBicep -JSONParameters $rawAllowedValues + $allowedValues = "{`n$bicepAllowedValues`n}" + } else { + $allowedValues = $rawAllowedValues + } + # Prepare the links to local headers $paramHeader = '### Parameter: `{0}`' -f $parameter.name $paramIdentifier = ('#{0}' -f $paramHeader.TrimStart('#').Trim().ToLower()) -replace '[:|`]' -replace ' ', '-' # Add external single quotes to all default values of type string except for those using functions $description = $parameter.metadata.description.Replace("`r`n", '

').Replace("`n", '

') - $allowedValues = ($rawAllowedValues -is [array]) ? ('[{0}]' -f (($rawAllowedValues | Sort-Object) -join ', ')) : (($rawAllowedValues -is [hashtable]) ? '{object}' : $rawAllowedValues) # Further, replace all "empty string" default values with actual visible quotes if ([regex]::Match($allowedValues, '^(\[\s*,.+)|(\[.+,\s*,)|(.+,\s*\])$').Captures.Count -gt 0) { $allowedValues = $allowedValues -replace '\[\s*,', "[''," -replace ',\s*,', ", ''," -replace ',\s*\]', ", '']" @@ -269,6 +294,36 @@ function Set-ParametersSection { $description = $description.substring("$category. ".Length) $newSectionContent += ('| [`{0}`]({1}) | {2} | {3} |' -f $parameter.name, $paramIdentifier, $type, $description) + if (-not [String]::IsNullOrEmpty($defaultValue)) { + if (($defaultValue -split '\n').count -eq 1) { + $formattedDefaultValue = '- Default: `{0}`' -f $defaultValue + } else { + $formattedDefaultValue = @( + '- Default:', + ' ```Bicep', + ($defaultValue -split '\n' | ForEach-Object { " $_" } | Out-String).TrimEnd(), + ' ```' + ) + } + } else { + $formattedDefaultValue = $null + } + + if (-not [String]::IsNullOrEmpty($allowedValues)) { + if (($allowedValues -split '\n').count -eq 1) { + $formattedAllowedValues = '- Default: `{0}`' -f $allowedValues + } else { + $formattedAllowedValues = @( + '- Allowed:', + ' ```Bicep', + ($allowedValues -split '\n' | Where-Object { -not [String]::IsNullOrEmpty($_) } | ForEach-Object { " $_" } | Out-String).TrimEnd(), + ' ```' + ) + } + } else { + $formattedAllowedValues = $null + } + $parameterList += @{ $paramIdentifier = @( $paramHeader, @@ -276,8 +331,8 @@ function Set-ParametersSection { $description, ('- Required: {0}' -f ($isRequired ? 'Yes' : 'No')), ('- Type: {0}' -f $type), - ((-not [String]::IsNullOrEmpty($defaultValue)) ? ('- Default: `{0}`' -f $defaultValue) : $null), - ((-not [String]::IsNullOrEmpty($allowedValues)) ? ('- Allowed: `{0}`' -f $allowedValues) : $null), + ((-not [String]::IsNullOrEmpty($formattedDefaultValue)) ? $formattedDefaultValue : $null), + ((-not [String]::IsNullOrEmpty($formattedAllowedValues)) ? $formattedAllowedValues : $null), '', (($parameterUsageContentMap.Keys -contains $parameter.name) ? $parameterUsageContentMap[$parameter.name] : $null) ) | Where-Object { $null -ne $_ } @@ -391,6 +446,9 @@ function Set-DefinitionSection { if ($parameterValue.ContainsKey('items') -and $parameterValue['items'].ContainsKey('properties')) { $childProperties = $parameterValue['items']['properties'] $listSectionContent += Set-DefinitionSection -TemplateFileContent $TemplateFileContent -Properties $childProperties -ParentName $paramIdentifier -ParentIdentifierLink $paramIdentifierLink + } elseif ($parameterValue.type -eq 'object' -and $parameterValue['properties']) { + $childProperties = $parameterValue['properties'] + $listSectionContent += Set-DefinitionSection -TemplateFileContent $TemplateFileContent -Properties $childProperties -ParentName $paramIdentifier -ParentIdentifierLink $paramIdentifierLink } } @@ -1085,6 +1143,7 @@ function Set-UsageExamplesSection { ) $brLink = Get-BRMRepositoryName -TemplateFilePath $TemplateFilePath + $targetVersion = Get-ModuleTargetVersion -ModuleFolderPath (Split-Path $TemplateFilePath -Parent) # Process content $SectionContent = [System.Collections.ArrayList]@( @@ -1092,7 +1151,7 @@ function Set-UsageExamplesSection { '', '>**Note**: Each example lists all the required parameters first, followed by the rest - each in alphabetical order.', '', - ('>**Note**: To reference the module, please use the following syntax `br/public:{0}:1.0.0`.' -f $brLink), + ('>**Note**: To reference the module, please use the following syntax `br/public:{0}:{1}`.' -f $brLink, $targetVersion), '' ) @@ -1193,7 +1252,7 @@ function Set-UsageExamplesSection { # [3/6] Format header, remove scope property & any empty line $rawBicepExample = $rawBicepExampleString -split '\n' - $rawBicepExample[0] = "module $moduleNameCamelCase 'br/public:$($brLink):1.0.0' = {" + $rawBicepExample[0] = "module $moduleNameCamelCase 'br/public:$($brLink):$($targetVersion)' = {" $rawBicepExample = $rawBicepExample | Where-Object { $_ -notmatch 'scope: *' } | Where-Object { -not [String]::IsNullOrEmpty($_) } # [4/6] Extract param block $rawBicepExampleArray = $rawBicepExample -split '\n' @@ -1561,6 +1620,7 @@ function Set-ModuleReadMe { . (Join-Path $PSScriptRoot 'helper' 'Get-SpecsAlignedResourceName.ps1') . (Join-Path $PSScriptRoot 'helper' 'ConvertTo-OrderedHashtable.ps1') . (Join-Path (Split-Path $PSScriptRoot -Parent) 'publish' 'helper' 'Get-BRMRepositoryName.ps1') + . (Join-Path (Split-Path $PSScriptRoot -Parent) 'publish' 'helper' 'Get-ModuleTargetVersion.ps1') # Check template & make full path $TemplateFilePath = Resolve-Path -Path $TemplateFilePath -ErrorAction Stop @@ -1710,7 +1770,7 @@ function Set-ModuleReadMe { Write-Verbose "File [$ReadMeFilePath] updated" -Verbose } else { if ($PSCmdlet.ShouldProcess("File in path [$ReadMeFilePath]", 'Create')) { - $null = New-Item -Path $ReadMeFilePath -Value $readMeFileContent -Force + $null = New-Item -Path $ReadMeFilePath -Value ($readMeFileContent | Out-String) -Force } Write-Verbose "File [$ReadMeFilePath] created" -Verbose }