diff --git a/arm/.global/global.module.tests.ps1 b/arm/.global/global.module.tests.ps1 index 18944f911c..5b12b3ac17 100644 --- a/arm/.global/global.module.tests.ps1 +++ b/arm/.global/global.module.tests.ps1 @@ -149,7 +149,7 @@ Describe 'Readme tests' -Tag Readme { if (-not ($convertedTemplates.Keys -contains $moduleFolderPathKey)) { if (Test-Path (Join-Path $moduleFolderPath 'deploy.bicep')) { $templateFilePath = Join-Path $moduleFolderPath 'deploy.bicep' - $templateContent = az bicep build --file $templateFilePath --stdout | ConvertFrom-Json -AsHashtable + $templateContent = az bicep build --file $templateFilePath --stdout --no-restore | ConvertFrom-Json -AsHashtable } elseIf (Test-Path (Join-Path $moduleFolderPath 'deploy.json')) { $templateFilePath = Join-Path $moduleFolderPath 'deploy.json' $templateContent = Get-Content $templateFilePath -Raw | ConvertFrom-Json -AsHashtable @@ -468,7 +468,7 @@ Describe 'Deployment template tests' -Tag Template { if (-not ($convertedTemplates.Keys -contains $moduleFolderPathKey)) { if (Test-Path (Join-Path $moduleFolderPath 'deploy.bicep')) { $templateFilePath = Join-Path $moduleFolderPath 'deploy.bicep' - $templateContent = az bicep build --file $templateFilePath --stdout | ConvertFrom-Json -AsHashtable + $templateContent = az bicep build --file $templateFilePath --stdout --no-restore | ConvertFrom-Json -AsHashtable } elseIf (Test-Path (Join-Path $moduleFolderPath 'deploy.json')) { $templateFilePath = Join-Path $moduleFolderPath 'deploy.json' $templateContent = Get-Content $templateFilePath -Raw | ConvertFrom-Json -AsHashtable @@ -801,10 +801,8 @@ Describe 'Deployment template tests' -Tag Template { $templateParameters = $templateContent.parameters.Keys foreach ($parameter in $templateParameters) { $data = ($templateContent.parameters.$parameter.metadata).description - switch -regex ($data) - { - '^Conditional. .*' - { + switch -regex ($data) { + '^Conditional. .*' { if ($data -notmatch '.*\. Required if .*') { $incorrectParameters += $parameter } @@ -922,7 +920,7 @@ Describe "API version tests [All apiVersions in the template should be 'recent'] if (-not ($convertedTemplates.Keys -contains $moduleFolderPathKey)) { if (Test-Path (Join-Path $moduleFolderPath 'deploy.bicep')) { $templateFilePath = Join-Path $moduleFolderPath 'deploy.bicep' - $templateContent = az bicep build --file $templateFilePath --stdout | ConvertFrom-Json -AsHashtable + $templateContent = az bicep build --file $templateFilePath --stdout --no-restore | ConvertFrom-Json -AsHashtable } elseIf (Test-Path (Join-Path $moduleFolderPath 'deploy.json')) { $templateFilePath = Join-Path $moduleFolderPath 'deploy.json' $templateContent = Get-Content $templateFilePath -Raw | ConvertFrom-Json -AsHashtable diff --git a/arm/Microsoft.Automation/automationAccounts/.parameters/encr.parameters.json b/arm/Microsoft.Automation/automationAccounts/.parameters/encr.parameters.json index c396172aaa..9bee988855 100644 --- a/arm/Microsoft.Automation/automationAccounts/.parameters/encr.parameters.json +++ b/arm/Microsoft.Automation/automationAccounts/.parameters/encr.parameters.json @@ -5,22 +5,21 @@ "name": { "value": "<>-wd-aut-encr-001" }, - "encryptionKeySource" : { - "value" : "Microsoft.Keyvault" + "encryptionKeySource": { + "value": "Microsoft.Keyvault" }, "encryptionUserAssignedIdentity": { "value": "/subscriptions/<>/resourcegroups/validation-rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/adp-<>-az-msi-x-001" // this identity needs to be one of the identities defined in userAssignedIdentities section }, - "keyName" : { - "value" : "keyEncryptionKey" + "keyName": { + "value": "keyEncryptionKey" }, - "keyvaultUri" : { - "value" : "https://adp-carml-az-kv-nopr-002.vault.azure.net/" + "keyvaultUri": { + "value": "https://adp-carml-az-kv-nopr-002.vault.azure.net/" }, - "keyVersion" : { - "value" : "9917c14be51d4d93b37218de7d326f60" + "keyVersion": { + "value": "9917c14be51d4d93b37218de7d326f60" }, - "userAssignedIdentities": { "value": { "/subscriptions/<>/resourcegroups/validation-rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/adp-<>-az-msi-x-001": {} diff --git a/arm/Microsoft.Compute/virtualMachines/readme.md b/arm/Microsoft.Compute/virtualMachines/readme.md index 69727052d0..514dd6ca0b 100644 --- a/arm/Microsoft.Compute/virtualMachines/readme.md +++ b/arm/Microsoft.Compute/virtualMachines/readme.md @@ -1739,22 +1739,7 @@ module virtualMachines './Microsoft.Compute/virtualMachines/deploy.bicep' = { } } adminUsername: 'localAdminUser' - adminPassword: [ - { - Value: { - keyVault: { - id: '/subscriptions/<>/resourceGroups/validation-rg/providers/Microsoft.KeyVault/vaults/adp-<>-az-kv-x-001' - } - secretName: 'adminPassword' - } - MemberType: 8 - IsSettable: true - IsGettable: true - TypeNameOfValue: 'System.Management.Automation.PSCustomObject' - Name: 'reference' - IsInstance: true - } - ] + adminPassword: kv1.getSecret('adminPassword') nicConfigurations: [ { nicSuffix: '-nic-01' diff --git a/arm/Microsoft.EventHub/namespaces/readme.md b/arm/Microsoft.EventHub/namespaces/readme.md index be4e504c71..a78fe18ed9 100644 --- a/arm/Microsoft.EventHub/namespaces/readme.md +++ b/arm/Microsoft.EventHub/namespaces/readme.md @@ -306,6 +306,7 @@ userAssignedIdentities: { module namespaces './Microsoft.EventHub/namespaces/deploy.bicep' = { name: '${uniqueString(deployment().name)}-namespaces' params: { + } ``` diff --git a/arm/Microsoft.KeyVault/vaults/readme.md b/arm/Microsoft.KeyVault/vaults/readme.md index 43b4f23147..6ecf79f56b 100644 --- a/arm/Microsoft.KeyVault/vaults/readme.md +++ b/arm/Microsoft.KeyVault/vaults/readme.md @@ -405,6 +405,7 @@ privateEndpoints: [ module vaults './Microsoft.KeyVault/vaults/deploy.bicep' = { name: '${uniqueString(deployment().name)}-vaults' params: { + } ``` diff --git a/arm/Microsoft.ServiceBus/namespaces/readme.md b/arm/Microsoft.ServiceBus/namespaces/readme.md index ebdb27c5d3..5bdc77443b 100644 --- a/arm/Microsoft.ServiceBus/namespaces/readme.md +++ b/arm/Microsoft.ServiceBus/namespaces/readme.md @@ -318,6 +318,7 @@ userAssignedIdentities: { module namespaces './Microsoft.ServiceBus/namespaces/deploy.bicep' = { name: '${uniqueString(deployment().name)}-namespaces' params: { + } ``` diff --git a/utilities/tools/Set-ModuleReadMe.ps1 b/utilities/tools/Set-ModuleReadMe.ps1 index df90c119b0..a91b2a501b 100644 --- a/utilities/tools/Set-ModuleReadMe.ps1 +++ b/utilities/tools/Set-ModuleReadMe.ps1 @@ -628,7 +628,7 @@ function Set-ModuleReadMe { if (-not $TemplateFileContent) { if ((Split-Path -Path $TemplateFilePath -Extension) -eq '.bicep') { - $templateFileContent = az bicep build --file $TemplateFilePath --stdout | ConvertFrom-Json -AsHashtable + $templateFileContent = az bicep build --file $TemplateFilePath --stdout --no-restore | ConvertFrom-Json -AsHashtable } else { $templateFileContent = ConvertFrom-Json (Get-Content $TemplateFilePath -Encoding 'utf8' -Raw) -ErrorAction Stop -AsHashtable }