Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
16 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 5 additions & 7 deletions arm/.global/global.module.tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
}
Expand Down Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,21 @@
"name": {
"value": "<<namePrefix>>-wd-aut-encr-001"
},
"encryptionKeySource" : {
"value" : "Microsoft.Keyvault"
"encryptionKeySource": {
"value": "Microsoft.Keyvault"
},
"encryptionUserAssignedIdentity": {
"value": "/subscriptions/<<subscriptionId>>/resourcegroups/validation-rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/adp-<<namePrefix>>-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/<<subscriptionId>>/resourcegroups/validation-rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/adp-<<namePrefix>>-az-msi-x-001": {}
Expand Down
17 changes: 1 addition & 16 deletions arm/Microsoft.Compute/virtualMachines/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -1739,22 +1739,7 @@ module virtualMachines './Microsoft.Compute/virtualMachines/deploy.bicep' = {
}
}
adminUsername: 'localAdminUser'
adminPassword: [
{
Value: {
keyVault: {
id: '/subscriptions/<<subscriptionId>>/resourceGroups/validation-rg/providers/Microsoft.KeyVault/vaults/adp-<<namePrefix>>-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'
Expand Down
1 change: 1 addition & 0 deletions arm/Microsoft.EventHub/namespaces/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -306,6 +306,7 @@ userAssignedIdentities: {
module namespaces './Microsoft.EventHub/namespaces/deploy.bicep' = {
name: '${uniqueString(deployment().name)}-namespaces'
params: {

}
```

Expand Down
1 change: 1 addition & 0 deletions arm/Microsoft.KeyVault/vaults/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -405,6 +405,7 @@ privateEndpoints: [
module vaults './Microsoft.KeyVault/vaults/deploy.bicep' = {
name: '${uniqueString(deployment().name)}-vaults'
params: {

}
```

Expand Down
1 change: 1 addition & 0 deletions arm/Microsoft.ServiceBus/namespaces/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -318,6 +318,7 @@ userAssignedIdentities: {
module namespaces './Microsoft.ServiceBus/namespaces/deploy.bicep' = {
name: '${uniqueString(deployment().name)}-namespaces'
params: {

}
```

Expand Down
2 changes: 1 addition & 1 deletion utilities/tools/Set-ModuleReadMe.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down