From e4a24f16b10e1a55a29b5298ba771a5933299a9b Mon Sep 17 00:00:00 2001 From: AlexanderSehr Date: Sat, 2 Sep 2023 13:32:43 +0200 Subject: [PATCH] Regenerated all docs --- .../.test/common/main.test.bicep | 11 +++++----- modules/network/virtual-network/README.md | 20 +++++++++---------- utilities/tools/Set-ModuleReadMe.ps1 | 3 +++ 3 files changed, 19 insertions(+), 15 deletions(-) diff --git a/modules/network/virtual-network/.test/common/main.test.bicep b/modules/network/virtual-network/.test/common/main.test.bicep index 996314b8e7..c0552ce142 100644 --- a/modules/network/virtual-network/.test/common/main.test.bicep +++ b/modules/network/virtual-network/.test/common/main.test.bicep @@ -59,6 +59,7 @@ module diagnosticDependencies '../../../../.shared/.templates/diagnostic.depende // Test Execution // // ============== // +var addressPrefix = '10.0.0.0/16' module testDeployment '../../main.bicep' = { scope: resourceGroup name: '${uniqueString(deployment().name, location)}-test-${serviceShort}' @@ -66,7 +67,7 @@ module testDeployment '../../main.bicep' = { enableDefaultTelemetry: enableDefaultTelemetry name: '${namePrefix}${serviceShort}001' addressPrefixes: [ - '10.0.0.0/16' + addressPrefix ] diagnosticStorageAccountId: diagnosticDependencies.outputs.storageAccountResourceId diagnosticWorkspaceId: diagnosticDependencies.outputs.logAnalyticsWorkspaceResourceId @@ -89,11 +90,11 @@ module testDeployment '../../main.bicep' = { flowTimeoutInMinutes: 20 subnets: [ { - addressPrefix: '10.0.255.0/24' + addressPrefix: cidrSubnet(addressPrefix, 24, 0) name: 'GatewaySubnet' } { - addressPrefix: '10.0.0.0/24' + addressPrefix: cidrSubnet(addressPrefix, 24, 1) name: '${namePrefix}-az-subnet-x-001' networkSecurityGroupId: nestedDependencies.outputs.networkSecurityGroupResourceId roleAssignments: [ @@ -116,7 +117,7 @@ module testDeployment '../../main.bicep' = { ] } { - addressPrefix: '10.0.3.0/24' + addressPrefix: cidrSubnet(addressPrefix, 24, 2) delegations: [ { name: 'netappDel' @@ -128,7 +129,7 @@ module testDeployment '../../main.bicep' = { name: '${namePrefix}-az-subnet-x-002' } { - addressPrefix: '10.0.6.0/24' + addressPrefix: cidrSubnet(addressPrefix, 24, 3) name: '${namePrefix}-az-subnet-x-003' privateEndpointNetworkPolicies: 'Disabled' privateLinkServiceNetworkPolicies: 'Enabled' diff --git a/modules/network/virtual-network/README.md b/modules/network/virtual-network/README.md index a27134f52d..97ba7ed506 100644 --- a/modules/network/virtual-network/README.md +++ b/modules/network/virtual-network/README.md @@ -375,7 +375,7 @@ module virtualNetwork './network/virtual-network/main.bicep' = { params: { // Required parameters addressPrefixes: [ - '10.0.0.0/16' + '' ] name: 'nvncom001' // Non-required parameters @@ -401,11 +401,11 @@ module virtualNetwork './network/virtual-network/main.bicep' = { ] subnets: [ { - addressPrefix: '10.0.255.0/24' + addressPrefix: '' name: 'GatewaySubnet' } { - addressPrefix: '10.0.0.0/24' + addressPrefix: '' name: 'az-subnet-x-001' networkSecurityGroupId: '' roleAssignments: [ @@ -428,7 +428,7 @@ module virtualNetwork './network/virtual-network/main.bicep' = { ] } { - addressPrefix: '10.0.3.0/24' + addressPrefix: '' delegations: [ { name: 'netappDel' @@ -440,7 +440,7 @@ module virtualNetwork './network/virtual-network/main.bicep' = { name: 'az-subnet-x-002' } { - addressPrefix: '10.0.6.0/24' + addressPrefix: '' name: 'az-subnet-x-003' privateEndpointNetworkPolicies: 'Disabled' privateLinkServiceNetworkPolicies: 'Enabled' @@ -470,7 +470,7 @@ module virtualNetwork './network/virtual-network/main.bicep' = { // Required parameters "addressPrefixes": { "value": [ - "10.0.0.0/16" + "" ] }, "name": { @@ -518,11 +518,11 @@ module virtualNetwork './network/virtual-network/main.bicep' = { "subnets": { "value": [ { - "addressPrefix": "10.0.255.0/24", + "addressPrefix": "", "name": "GatewaySubnet" }, { - "addressPrefix": "10.0.0.0/24", + "addressPrefix": "", "name": "az-subnet-x-001", "networkSecurityGroupId": "", "roleAssignments": [ @@ -545,7 +545,7 @@ module virtualNetwork './network/virtual-network/main.bicep' = { ] }, { - "addressPrefix": "10.0.3.0/24", + "addressPrefix": "", "delegations": [ { "name": "netappDel", @@ -557,7 +557,7 @@ module virtualNetwork './network/virtual-network/main.bicep' = { "name": "az-subnet-x-002" }, { - "addressPrefix": "10.0.6.0/24", + "addressPrefix": "", "name": "az-subnet-x-003", "privateEndpointNetworkPolicies": "Disabled", "privateLinkServiceNetworkPolicies": "Enabled" diff --git a/utilities/tools/Set-ModuleReadMe.ps1 b/utilities/tools/Set-ModuleReadMe.ps1 index 9f55b4cca6..5c98f9cd1a 100644 --- a/utilities/tools/Set-ModuleReadMe.ps1 +++ b/utilities/tools/Set-ModuleReadMe.ps1 @@ -730,6 +730,9 @@ function ConvertTo-FormattedJSONParameterObject { if ($line -notlike '*"*"*' -and $line -like '*.*') { # In case of a array value like '[ \n -> resourceGroupResources.outputs.managedIdentityPrincipalId <- \n ]' we'll only show """ $line = '"<{0}>"' -f $line.Split('.')[-1].Trim() + } elseif ($line -match '^\s*[a-zA-Z]+\s*$') { + # If there is simply only a value such as a variable reference, we'll wrap it as a string to replace. For example a reference of a variable `addressPrefix` will be replaced with `""` + $line = '"<{0}>"' -f $line.Trim() } }