From 9b45d1ebfed2c11d74be4bd6ca622496a68db648 Mon Sep 17 00:00:00 2001 From: MrMCake Date: Tue, 30 Aug 2022 22:01:36 +0200 Subject: [PATCH 01/16] [Modules] Updated Network/VPNSites to new dependency approach --- .github/workflows/ms.network.vpnsites.yml | 3 +- .../vpnSites/.test/default/dependencies.bicep | 24 +++ .../vpnSites/.test/default/deploy.test.bicep | 100 ++++++++++++ .../vpnSites/.test/min.parameters.json | 20 --- .../vpnSites/.test/min/dependencies.bicep | 13 ++ .../vpnSites/.test/min/deploy.test.bicep | 50 ++++++ .../vpnSites/.test/parameters.json | 77 ---------- .../Microsoft.Network/vpnSites/deploy.bicep | 4 +- modules/Microsoft.Network/vpnSites/readme.md | 144 +++++++++--------- 9 files changed, 264 insertions(+), 171 deletions(-) create mode 100644 modules/Microsoft.Network/vpnSites/.test/default/dependencies.bicep create mode 100644 modules/Microsoft.Network/vpnSites/.test/default/deploy.test.bicep delete mode 100644 modules/Microsoft.Network/vpnSites/.test/min.parameters.json create mode 100644 modules/Microsoft.Network/vpnSites/.test/min/dependencies.bicep create mode 100644 modules/Microsoft.Network/vpnSites/.test/min/deploy.test.bicep delete mode 100644 modules/Microsoft.Network/vpnSites/.test/parameters.json diff --git a/.github/workflows/ms.network.vpnsites.yml b/.github/workflows/ms.network.vpnsites.yml index 8488bb8a44..73f10b3c22 100644 --- a/.github/workflows/ms.network.vpnsites.yml +++ b/.github/workflows/ms.network.vpnsites.yml @@ -106,8 +106,7 @@ jobs: - name: 'Using test file [${{ matrix.moduleTestFilePaths }}]' uses: ./.github/actions/templates/validateModuleDeployment with: - templateFilePath: '${{ env.modulePath }}/deploy.bicep' - parameterFilePath: '${{ env.modulePath }}/${{ matrix.moduleTestFilePaths }}' + templateFilePath: '${{ env.modulePath }}/${{ matrix.moduleTestFilePaths }}' location: '${{ env.location }}' resourceGroupName: '${{ env.resourceGroupName }}' subscriptionId: '${{ secrets.ARM_SUBSCRIPTION_ID }}' diff --git a/modules/Microsoft.Network/vpnSites/.test/default/dependencies.bicep b/modules/Microsoft.Network/vpnSites/.test/default/dependencies.bicep new file mode 100644 index 0000000000..e5728278c1 --- /dev/null +++ b/modules/Microsoft.Network/vpnSites/.test/default/dependencies.bicep @@ -0,0 +1,24 @@ +@description('Required. The name of the managed identity to create.') +param managedIdentityName string + +@description('Required. The name of the virtual WAN to create.') +param virtualWANName string + +@description('Optional. The location to deploy resources to.') +param location string = resourceGroup().location + +resource managedIdentity 'Microsoft.ManagedIdentity/userAssignedIdentities@2018-11-30' = { + name: managedIdentityName + location: location +} + +resource virtualWan 'Microsoft.Network/virtualWans@2021-05-01' = { + name: virtualWANName + location: location +} + +@description('The principal ID of the created managed identity') +output managedIdentityPrincipalId string = managedIdentity.properties.principalId + +@description('The resource ID of the created Virtual WAN') +output virtualWWANResourceId string = virtualWan.id diff --git a/modules/Microsoft.Network/vpnSites/.test/default/deploy.test.bicep b/modules/Microsoft.Network/vpnSites/.test/default/deploy.test.bicep new file mode 100644 index 0000000000..0905f49105 --- /dev/null +++ b/modules/Microsoft.Network/vpnSites/.test/default/deploy.test.bicep @@ -0,0 +1,100 @@ +targetScope = 'subscription' + +// ========== // +// Parameters // +// ========== // +@description('Optional. The name of the resource group to deploy for a testing purposes') +@maxLength(80) +param resourceGroupName string = 'ms.network.vpnSites-${serviceShort}-rg' + +@description('Optional. The location to deploy resources to') +param location string = deployment().location + +@description('Optional. A short identifier for the kind of deployment. Should be kept short to not run into resource-name length-constraints') +param serviceShort string = 'nvsidef' + +// =========== // +// Deployments // +// =========== // + +// General resources +// ================= +resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { + name: resourceGroupName + location: location +} + +module resourceGroupResources 'dependencies.bicep' = { + scope: resourceGroup + name: '${uniqueString(deployment().name, location)}-nestedDependencies' + params: { + managedIdentityName: 'dep-<>-msi-${serviceShort}' + virtualWANName: 'dep-<>-vw-${serviceShort}' + } +} + +// ============== // +// Test Execution // +// ============== // + +module testDeployment '../../deploy.bicep' = { + scope: resourceGroup + name: '${uniqueString(deployment().name)}-test-${serviceShort}' + params: { + name: '<>-${serviceShort}' + virtualWanId: resourceGroupResources.outputs.virtualWWANResourceId + lock: 'CanNotDelete' + tags: { + tagA: 'valueA' + tagB: 'valueB' + } + deviceProperties: { + linkSpeedInMbps: 0 + } + vpnSiteLinks: [ + { + name: '<>-vSite-${serviceShort}' + properties: { + bgpProperties: { + asn: 65010 + bgpPeeringAddress: '1.1.1.1' + } + ipAddress: '1.2.3.4' + linkProperties: { + linkProviderName: 'contoso' + linkSpeedInMbps: 5 + } + } + } + { + name: 'Link1' + properties: { + bgpProperties: { + asn: 65020 + bgpPeeringAddress: '192.168.1.0' + } + ipAddress: '2.2.2.2' + linkProperties: { + linkProviderName: 'contoso' + linkSpeedInMbps: 5 + } + } + } + ] + o365Policy: { + breakOutCategories: { + optimize: true + allow: true + default: true + } + } + roleAssignments: [ + { + roleDefinitionIdOrName: 'Reader' + principalIds: [ + resourceGroupResources.outputs.managedIdentityPrincipalId + ] + } + ] + } +} diff --git a/modules/Microsoft.Network/vpnSites/.test/min.parameters.json b/modules/Microsoft.Network/vpnSites/.test/min.parameters.json deleted file mode 100644 index 24791e0339..0000000000 --- a/modules/Microsoft.Network/vpnSites/.test/min.parameters.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentParameters.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "name": { - "value": "<>-az-vSite-min-001" - }, - "addressPrefixes": { - "value": [ - "10.0.0.0/16" - ] - }, - "ipAddress": { - "value": "1.2.3.4" - }, - "virtualWanId": { - "value": "/subscriptions/<>/resourceGroups/validation-rg/providers/Microsoft.Network/virtualWans/apd-<>-az-vw-x-001" - } - } -} diff --git a/modules/Microsoft.Network/vpnSites/.test/min/dependencies.bicep b/modules/Microsoft.Network/vpnSites/.test/min/dependencies.bicep new file mode 100644 index 0000000000..33c8d7907d --- /dev/null +++ b/modules/Microsoft.Network/vpnSites/.test/min/dependencies.bicep @@ -0,0 +1,13 @@ +@description('Required. The name of the virtual WAN to create.') +param virtualWANName string + +@description('Optional. The location to deploy resources to.') +param location string = resourceGroup().location + +resource virtualWan 'Microsoft.Network/virtualWans@2021-05-01' = { + name: virtualWANName + location: location +} + +@description('The resource ID of the created Virtual WAN') +output virtualWWANResourceId string = virtualWan.id diff --git a/modules/Microsoft.Network/vpnSites/.test/min/deploy.test.bicep b/modules/Microsoft.Network/vpnSites/.test/min/deploy.test.bicep new file mode 100644 index 0000000000..0d461f2a9d --- /dev/null +++ b/modules/Microsoft.Network/vpnSites/.test/min/deploy.test.bicep @@ -0,0 +1,50 @@ +targetScope = 'subscription' + +// ========== // +// Parameters // +// ========== // +@description('Optional. The name of the resource group to deploy for a testing purposes') +@maxLength(80) +param resourceGroupName string = 'ms.network.vpnSites-${serviceShort}-rg' + +@description('Optional. The location to deploy resources to') +param location string = deployment().location + +@description('Optional. A short identifier for the kind of deployment. Should be kept short to not run into resource-name length-constraints') +param serviceShort string = 'nvsimin' + +// =========== // +// Deployments // +// =========== // + +// General resources +// ================= +resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { + name: resourceGroupName + location: location +} + +module resourceGroupResources 'dependencies.bicep' = { + scope: resourceGroup + name: '${uniqueString(deployment().name, location)}-nestedDependencies' + params: { + virtualWANName: 'dep-<>-vw-${serviceShort}' + } +} + +// ============== // +// Test Execution // +// ============== // + +module testDeployment '../../deploy.bicep' = { + scope: resourceGroup + name: '${uniqueString(deployment().name)}-test-${serviceShort}' + params: { + name: '<>-${serviceShort}' + virtualWanId: resourceGroupResources.outputs.virtualWWANResourceId + addressPrefixes: [ + '10.0.0.0/16' + ] + ipAddress: '1.2.3.4' + } +} diff --git a/modules/Microsoft.Network/vpnSites/.test/parameters.json b/modules/Microsoft.Network/vpnSites/.test/parameters.json deleted file mode 100644 index 94c534c5e4..0000000000 --- a/modules/Microsoft.Network/vpnSites/.test/parameters.json +++ /dev/null @@ -1,77 +0,0 @@ -{ - "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentParameters.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "name": { - "value": "<>-az-vSite-x-001" - }, - "lock": { - "value": "CanNotDelete" - }, - "tags": { - "value": { - "tagA": "valueA", - "tagB": "valueB" - } - }, - "deviceProperties": { - "value": { - "linkSpeedInMbps": 0 - } - }, - "virtualWanId": { - "value": "/subscriptions/<>/resourceGroups/validation-rg/providers/Microsoft.Network/virtualWans/apd-<>-az-vw-x-001" - }, - "vpnSiteLinks": { - "value": [ - { - "name": "<>-az-vSite-x-001", - "properties": { - "bgpProperties": { - "asn": 65010, - "bgpPeeringAddress": "1.1.1.1" - }, - "ipAddress": "1.2.3.4", - "linkProperties": { - "linkProviderName": "contoso", - "linkSpeedInMbps": 5 - } - } - }, - { - "name": "Link1", - "properties": { - "bgpProperties": { - "asn": 65020, - "bgpPeeringAddress": "192.168.1.0" - }, - "ipAddress": "2.2.2.2", - "linkProperties": { - "linkProviderName": "contoso", - "linkSpeedInMbps": 5 - } - } - } - ] - }, - "o365Policy": { - "value": { - "breakOutCategories": { - "optimize": true, - "allow": true, - "default": true - } - } - }, - "roleAssignments": { - "value": [ - { - "roleDefinitionIdOrName": "Reader", - "principalIds": [ - "<>" - ] - } - ] - } - } -} diff --git a/modules/Microsoft.Network/vpnSites/deploy.bicep b/modules/Microsoft.Network/vpnSites/deploy.bicep index 980ad072d4..356cdedb15 100644 --- a/modules/Microsoft.Network/vpnSites/deploy.bicep +++ b/modules/Microsoft.Network/vpnSites/deploy.bicep @@ -10,10 +10,10 @@ param location string = resourceGroup().location @description('Optional. Tags of the resource.') param tags object = {} -@description('Optional. An array of IP address ranges that can be used by subnets of the virtual network. Must be provided if no bgpProperties or VPNSiteLinks are configured.') +@description('Conditional. An array of IP address ranges that can be used by subnets of the virtual network. Required if no bgpProperties or VPNSiteLinks are configured.') param addressPrefixes array = [] -@description('Optional. BGP settings details. Must be provided if no addressPrefixes or VPNSiteLinks are configured. Note: This is a deprecated property, please use the corresponding VpnSiteLinks property instead.') +@description('Conditional. BGP settings details. Note: This is a deprecated property, please use the corresponding VpnSiteLinks property instead. Required if no addressPrefixes or VPNSiteLinks are configured.') param bgpProperties object = {} @description('Optional. List of properties of the device.') diff --git a/modules/Microsoft.Network/vpnSites/readme.md b/modules/Microsoft.Network/vpnSites/readme.md index 4adbe8a0be..9ee9435bc0 100644 --- a/modules/Microsoft.Network/vpnSites/readme.md +++ b/modules/Microsoft.Network/vpnSites/readme.md @@ -26,11 +26,15 @@ This module deploys a VPN Site. | `name` | string | Name of the VPN Site. | | `virtualWanId` | string | Resource ID of the virtual WAN to link to. | +**Conditional parameters** +| Parameter Name | Type | Description | +| :-- | :-- | :-- | +| `addressPrefixes` | array | An array of IP address ranges that can be used by subnets of the virtual network. Required if no bgpProperties or VPNSiteLinks are configured. | +| `bgpProperties` | object | BGP settings details. Note: This is a deprecated property, please use the corresponding VpnSiteLinks property instead. Required if no addressPrefixes or VPNSiteLinks are configured. | + **Optional parameters** | Parameter Name | Type | Default Value | Allowed Values | Description | | :-- | :-- | :-- | :-- | :-- | -| `addressPrefixes` | array | `[]` | | An array of IP address ranges that can be used by subnets of the virtual network. Must be provided if no bgpProperties or VPNSiteLinks are configured. | -| `bgpProperties` | object | `{object}` | | BGP settings details. Must be provided if no addressPrefixes or VPNSiteLinks are configured. Note: This is a deprecated property, please use the corresponding VpnSiteLinks property instead. | | `deviceProperties` | object | `{object}` | | List of properties of the device. | | `enableDefaultTelemetry` | bool | `True` | | Enable telemetry via the Customer Usage Attribution ID (GUID). | | `ipAddress` | string | `''` | | The IP-address for the VPN-site. Note: This is a deprecated property, please use the corresponding VpnSiteLinks property instead. | @@ -327,76 +331,19 @@ The following module usage examples are retrieved from the content of the files >**Note**: The name of each example is based on the name of the file from which it is taken. >**Note**: Each example lists all the required parameters first, followed by the rest - each in alphabetical order. -

Example 1: Min

- -
- -via Bicep module - -```bicep -module vpnSites './Microsoft.Network/vpnSites/deploy.bicep' = { - name: '${uniqueString(deployment().name)}-vpnSites' - params: { - // Required parameters - name: '<>-az-vSite-min-001' - virtualWanId: '/subscriptions/<>/resourceGroups/validation-rg/providers/Microsoft.Network/virtualWans/apd-<>-az-vw-x-001' - // Non-required parameters - addressPrefixes: [ - '10.0.0.0/16' - ] - ipAddress: '1.2.3.4' - } -} -``` - -
-

- -

- -via JSON Parameter file - -```json -{ - "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentParameters.json#", - "contentVersion": "1.0.0.0", - "parameters": { - // Required parameters - "name": { - "value": "<>-az-vSite-min-001" - }, - "virtualWanId": { - "value": "/subscriptions/<>/resourceGroups/validation-rg/providers/Microsoft.Network/virtualWans/apd-<>-az-vw-x-001" - }, - // Non-required parameters - "addressPrefixes": { - "value": [ - "10.0.0.0/16" - ] - }, - "ipAddress": { - "value": "1.2.3.4" - } - } -} -``` - -
-

- -

Example 2: Parameters

+

Example 1: Default

via Bicep module ```bicep -module vpnSites './Microsoft.Network/vpnSites/deploy.bicep' = { - name: '${uniqueString(deployment().name)}-vpnSites' +module Vpnsites './Microsoft.Network/Vpnsites/deploy.bicep' = { + name: '${uniqueString(deployment().name)}-test-nvsidef' params: { // Required parameters - name: '<>-az-vSite-x-001' - virtualWanId: '/subscriptions/<>/resourceGroups/validation-rg/providers/Microsoft.Network/virtualWans/apd-<>-az-vw-x-001' + name: '<>-nvsidef' + virtualWanId: '' // Non-required parameters deviceProperties: { linkSpeedInMbps: 0 @@ -412,7 +359,7 @@ module vpnSites './Microsoft.Network/vpnSites/deploy.bicep' = { roleAssignments: [ { principalIds: [ - '<>' + '' ] roleDefinitionIdOrName: 'Reader' } @@ -423,7 +370,7 @@ module vpnSites './Microsoft.Network/vpnSites/deploy.bicep' = { } vpnSiteLinks: [ { - name: '<>-az-vSite-x-001' + name: '<>-vSite-nvsidef' properties: { bgpProperties: { asn: 65010 @@ -469,10 +416,10 @@ module vpnSites './Microsoft.Network/vpnSites/deploy.bicep' = { "parameters": { // Required parameters "name": { - "value": "<>-az-vSite-x-001" + "value": "<>-nvsidef" }, "virtualWanId": { - "value": "/subscriptions/<>/resourceGroups/validation-rg/providers/Microsoft.Network/virtualWans/apd-<>-az-vw-x-001" + "value": "" }, // Non-required parameters "deviceProperties": { @@ -496,7 +443,7 @@ module vpnSites './Microsoft.Network/vpnSites/deploy.bicep' = { "value": [ { "principalIds": [ - "<>" + "" ], "roleDefinitionIdOrName": "Reader" } @@ -511,7 +458,7 @@ module vpnSites './Microsoft.Network/vpnSites/deploy.bicep' = { "vpnSiteLinks": { "value": [ { - "name": "<>-az-vSite-x-001", + "name": "<>-vSite-nvsidef", "properties": { "bgpProperties": { "asn": 65010, @@ -546,3 +493,60 @@ module vpnSites './Microsoft.Network/vpnSites/deploy.bicep' = {

+ +

Example 2: Min

+ +
+ +via Bicep module + +```bicep +module Vpnsites './Microsoft.Network/Vpnsites/deploy.bicep' = { + name: '${uniqueString(deployment().name)}-test-nvsimin' + params: { + // Required parameters + name: '<>-nvsimin' + virtualWanId: '' + // Non-required parameters + addressPrefixes: [ + '10.0.0.0/16' + ] + ipAddress: '1.2.3.4' + } +} +``` + +
+

+ +

+ +via JSON Parameter file + +```json +{ + "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentParameters.json#", + "contentVersion": "1.0.0.0", + "parameters": { + // Required parameters + "name": { + "value": "<>-nvsimin" + }, + "virtualWanId": { + "value": "" + }, + // Non-required parameters + "addressPrefixes": { + "value": [ + "10.0.0.0/16" + ] + }, + "ipAddress": { + "value": "1.2.3.4" + } + } +} +``` + +
+

From e38cab80ee8db528f2141b269a58121f68dca0b9 Mon Sep 17 00:00:00 2001 From: MrMCake Date: Thu, 1 Sep 2022 11:36:27 +0200 Subject: [PATCH 02/16] Update to latest --- modules/Microsoft.Network/vpnSites/readme.md | 65 ++------------------ 1 file changed, 4 insertions(+), 61 deletions(-) diff --git a/modules/Microsoft.Network/vpnSites/readme.md b/modules/Microsoft.Network/vpnSites/readme.md index 4acf73ea93..f1e80e1f56 100644 --- a/modules/Microsoft.Network/vpnSites/readme.md +++ b/modules/Microsoft.Network/vpnSites/readme.md @@ -331,72 +331,15 @@ The following module usage examples are retrieved from the content of the files >**Note**: The name of each example is based on the name of the file from which it is taken. >**Note**: Each example lists all the required parameters first, followed by the rest - each in alphabetical order. -

Example 1: Min

+

Example 1: Default

via Bicep module ```bicep -module vpnSites './Microsoft.Network/vpnSites/deploy.bicep' = { - name: '${uniqueString(deployment().name)}-VpnSites' - params: { - // Required parameters - name: '<>-az-vSite-min-001' - virtualWanId: '/subscriptions/<>/resourceGroups/validation-rg/providers/Microsoft.Network/virtualWans/apd-<>-az-vw-x-001' - // Non-required parameters - addressPrefixes: [ - '10.0.0.0/16' - ] - ipAddress: '1.2.3.4' - } -} -``` - -
-

- -

- -via JSON Parameter file - -```json -{ - "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentParameters.json#", - "contentVersion": "1.0.0.0", - "parameters": { - // Required parameters - "name": { - "value": "<>-az-vSite-min-001" - }, - "virtualWanId": { - "value": "/subscriptions/<>/resourceGroups/validation-rg/providers/Microsoft.Network/virtualWans/apd-<>-az-vw-x-001" - }, - // Non-required parameters - "addressPrefixes": { - "value": [ - "10.0.0.0/16" - ] - }, - "ipAddress": { - "value": "1.2.3.4" - } - } -} -``` - -
-

- -

Example 2: Parameters

- -
- -via Bicep module - -```bicep -module vpnSites './Microsoft.Network/vpnSites/deploy.bicep' = { - name: '${uniqueString(deployment().name)}-VpnSites' +module VPNSites './Microsoft.Network/VPNSites/deploy.bicep' = { + name: '${uniqueString(deployment().name)}-test-nvsidef' params: { // Required parameters name: '<>-nvsidef' @@ -558,7 +501,7 @@ module vpnSites './Microsoft.Network/vpnSites/deploy.bicep' = { via Bicep module ```bicep -module Vpnsites './Microsoft.Network/Vpnsites/deploy.bicep' = { +module VPNSites './Microsoft.Network/VPNSites/deploy.bicep' = { name: '${uniqueString(deployment().name)}-test-nvsimin' params: { // Required parameters From ebad4230ff0976bde14e15fa74c1c2f106f503e9 Mon Sep 17 00:00:00 2001 From: MrMCake Date: Thu, 8 Sep 2022 19:13:01 +0200 Subject: [PATCH 03/16] Updated folder default to common. --- .../vpnSites/.test/{default => common}/dependencies.bicep | 0 .../vpnSites/.test/{default => common}/deploy.test.bicep | 0 modules/Microsoft.Network/vpnSites/readme.md | 6 +++--- 3 files changed, 3 insertions(+), 3 deletions(-) rename modules/Microsoft.Network/vpnSites/.test/{default => common}/dependencies.bicep (100%) rename modules/Microsoft.Network/vpnSites/.test/{default => common}/deploy.test.bicep (100%) diff --git a/modules/Microsoft.Network/vpnSites/.test/default/dependencies.bicep b/modules/Microsoft.Network/vpnSites/.test/common/dependencies.bicep similarity index 100% rename from modules/Microsoft.Network/vpnSites/.test/default/dependencies.bicep rename to modules/Microsoft.Network/vpnSites/.test/common/dependencies.bicep diff --git a/modules/Microsoft.Network/vpnSites/.test/default/deploy.test.bicep b/modules/Microsoft.Network/vpnSites/.test/common/deploy.test.bicep similarity index 100% rename from modules/Microsoft.Network/vpnSites/.test/default/deploy.test.bicep rename to modules/Microsoft.Network/vpnSites/.test/common/deploy.test.bicep diff --git a/modules/Microsoft.Network/vpnSites/readme.md b/modules/Microsoft.Network/vpnSites/readme.md index f1e80e1f56..69a64514ef 100644 --- a/modules/Microsoft.Network/vpnSites/readme.md +++ b/modules/Microsoft.Network/vpnSites/readme.md @@ -331,14 +331,14 @@ The following module usage examples are retrieved from the content of the files >**Note**: The name of each example is based on the name of the file from which it is taken. >**Note**: Each example lists all the required parameters first, followed by the rest - each in alphabetical order. -

Example 1: Default

+

Example 1: Common

via Bicep module ```bicep -module VPNSites './Microsoft.Network/VPNSites/deploy.bicep' = { +module vpnSites './Microsoft.Network/vpnSites/deploy.bicep' = { name: '${uniqueString(deployment().name)}-test-nvsidef' params: { // Required parameters @@ -501,7 +501,7 @@ module VPNSites './Microsoft.Network/VPNSites/deploy.bicep' = { via Bicep module ```bicep -module VPNSites './Microsoft.Network/VPNSites/deploy.bicep' = { +module vpnSites './Microsoft.Network/vpnSites/deploy.bicep' = { name: '${uniqueString(deployment().name)}-test-nvsimin' params: { // Required parameters From 4dae77c944f15b41e71709cb1dea580d495a2342 Mon Sep 17 00:00:00 2001 From: MrMCake Date: Fri, 9 Sep 2022 12:51:41 +0200 Subject: [PATCH 04/16] Update to latest --- .../Microsoft.Network/vpnSites/.test/common/deploy.test.bicep | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/Microsoft.Network/vpnSites/.test/common/deploy.test.bicep b/modules/Microsoft.Network/vpnSites/.test/common/deploy.test.bicep index 0905f49105..985ac81505 100644 --- a/modules/Microsoft.Network/vpnSites/.test/common/deploy.test.bicep +++ b/modules/Microsoft.Network/vpnSites/.test/common/deploy.test.bicep @@ -11,7 +11,7 @@ param resourceGroupName string = 'ms.network.vpnSites-${serviceShort}-rg' param location string = deployment().location @description('Optional. A short identifier for the kind of deployment. Should be kept short to not run into resource-name length-constraints') -param serviceShort string = 'nvsidef' +param serviceShort string = 'nvsicom' // =========== // // Deployments // From feb6403269dced94a3fc27d1cb996660a8984a89 Mon Sep 17 00:00:00 2001 From: MrMCake Date: Fri, 9 Sep 2022 13:04:47 +0200 Subject: [PATCH 05/16] Update to latest --- .../vpnSites/.test/common/deploy.test.bicep | 6 +++--- .../Microsoft.Network/vpnSites/.test/min/deploy.test.bicep | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/modules/Microsoft.Network/vpnSites/.test/common/deploy.test.bicep b/modules/Microsoft.Network/vpnSites/.test/common/deploy.test.bicep index 985ac81505..d3ca584e2b 100644 --- a/modules/Microsoft.Network/vpnSites/.test/common/deploy.test.bicep +++ b/modules/Microsoft.Network/vpnSites/.test/common/deploy.test.bicep @@ -3,14 +3,14 @@ targetScope = 'subscription' // ========== // // Parameters // // ========== // -@description('Optional. The name of the resource group to deploy for a testing purposes') +@description('Optional. The name of the resource group to deploy for a testing purposes.') @maxLength(80) param resourceGroupName string = 'ms.network.vpnSites-${serviceShort}-rg' -@description('Optional. The location to deploy resources to') +@description('Optional. The location to deploy resources to.') param location string = deployment().location -@description('Optional. A short identifier for the kind of deployment. Should be kept short to not run into resource-name length-constraints') +@description('Optional. A short identifier for the kind of deployment. Should be kept short to not run into resource-name length-constraints.') param serviceShort string = 'nvsicom' // =========== // diff --git a/modules/Microsoft.Network/vpnSites/.test/min/deploy.test.bicep b/modules/Microsoft.Network/vpnSites/.test/min/deploy.test.bicep index 0d461f2a9d..2f35c8f7eb 100644 --- a/modules/Microsoft.Network/vpnSites/.test/min/deploy.test.bicep +++ b/modules/Microsoft.Network/vpnSites/.test/min/deploy.test.bicep @@ -3,14 +3,14 @@ targetScope = 'subscription' // ========== // // Parameters // // ========== // -@description('Optional. The name of the resource group to deploy for a testing purposes') +@description('Optional. The name of the resource group to deploy for a testing purposes.') @maxLength(80) param resourceGroupName string = 'ms.network.vpnSites-${serviceShort}-rg' -@description('Optional. The location to deploy resources to') +@description('Optional. The location to deploy resources to.') param location string = deployment().location -@description('Optional. A short identifier for the kind of deployment. Should be kept short to not run into resource-name length-constraints') +@description('Optional. A short identifier for the kind of deployment. Should be kept short to not run into resource-name length-constraints.') param serviceShort string = 'nvsimin' // =========== // From 010431a75e45e6ccb5d54872886bcfcbb5d4bd62 Mon Sep 17 00:00:00 2001 From: MrMCake Date: Fri, 9 Sep 2022 13:55:52 +0200 Subject: [PATCH 06/16] Update to latest --- modules/Microsoft.Network/vpnSites/readme.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/modules/Microsoft.Network/vpnSites/readme.md b/modules/Microsoft.Network/vpnSites/readme.md index 879210fc76..67b3b8a947 100644 --- a/modules/Microsoft.Network/vpnSites/readme.md +++ b/modules/Microsoft.Network/vpnSites/readme.md @@ -340,10 +340,10 @@ The following module usage examples are retrieved from the content of the files ```bicep module vpnSites './Microsoft.Network/vpnSites/deploy.bicep' = { - name: '${uniqueString(deployment().name)}-test-nvsidef' + name: '${uniqueString(deployment().name)}-test-nvsicom' params: { // Required parameters - name: '<>-nvsidef' + name: '<>-nvsicom' virtualWanId: '' // Non-required parameters deviceProperties: { @@ -371,7 +371,7 @@ module vpnSites './Microsoft.Network/vpnSites/deploy.bicep' = { } vpnSiteLinks: [ { - name: '<>-vSite-nvsidef' + name: '<>-vSite-nvsicom' properties: { bgpProperties: { asn: 65010 @@ -417,7 +417,7 @@ module vpnSites './Microsoft.Network/vpnSites/deploy.bicep' = { "parameters": { // Required parameters "name": { - "value": "<>-nvsidef" + "value": "<>-nvsicom" }, "virtualWanId": { "value": "" @@ -459,7 +459,7 @@ module vpnSites './Microsoft.Network/vpnSites/deploy.bicep' = { "vpnSiteLinks": { "value": [ { - "name": "<>-vSite-nvsidef", + "name": "<>-vSite-nvsicom", "properties": { "bgpProperties": { "asn": 65010, From 173e329fbaa9dc09261f43e80eb6cf45d61fcb9c Mon Sep 17 00:00:00 2001 From: Alexander Sehr Date: Mon, 19 Sep 2022 08:41:30 +0200 Subject: [PATCH 07/16] Update modules/Microsoft.Network/vpnSites/.test/common/deploy.test.bicep --- .../Microsoft.Network/vpnSites/.test/common/deploy.test.bicep | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/Microsoft.Network/vpnSites/.test/common/deploy.test.bicep b/modules/Microsoft.Network/vpnSites/.test/common/deploy.test.bicep index d3ca584e2b..177c364b3e 100644 --- a/modules/Microsoft.Network/vpnSites/.test/common/deploy.test.bicep +++ b/modules/Microsoft.Network/vpnSites/.test/common/deploy.test.bicep @@ -3,7 +3,7 @@ targetScope = 'subscription' // ========== // // Parameters // // ========== // -@description('Optional. The name of the resource group to deploy for a testing purposes.') +@description('Optional. The name of the resource group to deploy for testing purposes.') @maxLength(80) param resourceGroupName string = 'ms.network.vpnSites-${serviceShort}-rg' From 54084715f03aa5c27d31fc4aa3026701505c2653 Mon Sep 17 00:00:00 2001 From: Alexander Sehr Date: Mon, 19 Sep 2022 08:41:43 +0200 Subject: [PATCH 08/16] Update modules/Microsoft.Network/vpnSites/.test/min/deploy.test.bicep --- modules/Microsoft.Network/vpnSites/.test/min/deploy.test.bicep | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/Microsoft.Network/vpnSites/.test/min/deploy.test.bicep b/modules/Microsoft.Network/vpnSites/.test/min/deploy.test.bicep index 2f35c8f7eb..f006702bd9 100644 --- a/modules/Microsoft.Network/vpnSites/.test/min/deploy.test.bicep +++ b/modules/Microsoft.Network/vpnSites/.test/min/deploy.test.bicep @@ -3,7 +3,7 @@ targetScope = 'subscription' // ========== // // Parameters // // ========== // -@description('Optional. The name of the resource group to deploy for a testing purposes.') +@description('Optional. The name of the resource group to deploy for testing purposes.') @maxLength(80) param resourceGroupName string = 'ms.network.vpnSites-${serviceShort}-rg' From e205151197509f86960f27b7793e9f263e65f642 Mon Sep 17 00:00:00 2001 From: MrMCake Date: Wed, 28 Sep 2022 17:37:55 +0200 Subject: [PATCH 09/16] Update to latest --- modules/Microsoft.Network/vpnSites/readme.md | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/Microsoft.Network/vpnSites/readme.md b/modules/Microsoft.Network/vpnSites/readme.md index 43b5bb0500..bc2bf88595 100644 --- a/modules/Microsoft.Network/vpnSites/readme.md +++ b/modules/Microsoft.Network/vpnSites/readme.md @@ -28,6 +28,7 @@ This module deploys a VPN Site. | `virtualWanId` | string | Resource ID of the virtual WAN to link to. | **Conditional parameters** + | Parameter Name | Type | Description | | :-- | :-- | :-- | | `addressPrefixes` | array | An array of IP address ranges that can be used by subnets of the virtual network. Required if no bgpProperties or VPNSiteLinks are configured. | From 9dc040a1194c707b90d3d7977f95c6ca122420b7 Mon Sep 17 00:00:00 2001 From: Alexander Sehr Date: Thu, 29 Sep 2022 12:05:43 +0200 Subject: [PATCH 10/16] Update modules/Microsoft.Network/vpnSites/.test/common/dependencies.bicep Co-authored-by: Erika Gressi <56914614+eriqua@users.noreply.github.com> --- .../Microsoft.Network/vpnSites/.test/common/dependencies.bicep | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/Microsoft.Network/vpnSites/.test/common/dependencies.bicep b/modules/Microsoft.Network/vpnSites/.test/common/dependencies.bicep index e5728278c1..b838bac0ed 100644 --- a/modules/Microsoft.Network/vpnSites/.test/common/dependencies.bicep +++ b/modules/Microsoft.Network/vpnSites/.test/common/dependencies.bicep @@ -17,7 +17,7 @@ resource virtualWan 'Microsoft.Network/virtualWans@2021-05-01' = { location: location } -@description('The principal ID of the created managed identity') +@description('The principal ID of the created managed identity.') output managedIdentityPrincipalId string = managedIdentity.properties.principalId @description('The resource ID of the created Virtual WAN') From c9eeba574b16d786d4954f98b27234d9d1399257 Mon Sep 17 00:00:00 2001 From: Alexander Sehr Date: Thu, 29 Sep 2022 12:06:11 +0200 Subject: [PATCH 11/16] Update modules/Microsoft.Network/vpnSites/.test/min/deploy.test.bicep Co-authored-by: Erika Gressi <56914614+eriqua@users.noreply.github.com> --- modules/Microsoft.Network/vpnSites/.test/min/deploy.test.bicep | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/Microsoft.Network/vpnSites/.test/min/deploy.test.bicep b/modules/Microsoft.Network/vpnSites/.test/min/deploy.test.bicep index f006702bd9..595a369c6b 100644 --- a/modules/Microsoft.Network/vpnSites/.test/min/deploy.test.bicep +++ b/modules/Microsoft.Network/vpnSites/.test/min/deploy.test.bicep @@ -11,7 +11,7 @@ param resourceGroupName string = 'ms.network.vpnSites-${serviceShort}-rg' param location string = deployment().location @description('Optional. A short identifier for the kind of deployment. Should be kept short to not run into resource-name length-constraints.') -param serviceShort string = 'nvsimin' +param serviceShort string = 'nvsmin' // =========== // // Deployments // From 12e6e470948936a6625c516cd9973bc186733a51 Mon Sep 17 00:00:00 2001 From: Alexander Sehr Date: Thu, 29 Sep 2022 12:06:36 +0200 Subject: [PATCH 12/16] Update modules/Microsoft.Network/vpnSites/.test/common/deploy.test.bicep Co-authored-by: Erika Gressi <56914614+eriqua@users.noreply.github.com> --- .../Microsoft.Network/vpnSites/.test/common/deploy.test.bicep | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/Microsoft.Network/vpnSites/.test/common/deploy.test.bicep b/modules/Microsoft.Network/vpnSites/.test/common/deploy.test.bicep index 177c364b3e..8305c719e5 100644 --- a/modules/Microsoft.Network/vpnSites/.test/common/deploy.test.bicep +++ b/modules/Microsoft.Network/vpnSites/.test/common/deploy.test.bicep @@ -11,7 +11,7 @@ param resourceGroupName string = 'ms.network.vpnSites-${serviceShort}-rg' param location string = deployment().location @description('Optional. A short identifier for the kind of deployment. Should be kept short to not run into resource-name length-constraints.') -param serviceShort string = 'nvsicom' +param serviceShort string = 'nvscom' // =========== // // Deployments // From 7edf44fcd9ee7cba17a8804f6be58dbd5520bfbe Mon Sep 17 00:00:00 2001 From: Alexander Sehr Date: Thu, 29 Sep 2022 12:06:41 +0200 Subject: [PATCH 13/16] Update modules/Microsoft.Network/vpnSites/.test/common/dependencies.bicep Co-authored-by: Erika Gressi <56914614+eriqua@users.noreply.github.com> --- .../Microsoft.Network/vpnSites/.test/common/dependencies.bicep | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/Microsoft.Network/vpnSites/.test/common/dependencies.bicep b/modules/Microsoft.Network/vpnSites/.test/common/dependencies.bicep index b838bac0ed..958f2e3650 100644 --- a/modules/Microsoft.Network/vpnSites/.test/common/dependencies.bicep +++ b/modules/Microsoft.Network/vpnSites/.test/common/dependencies.bicep @@ -20,5 +20,5 @@ resource virtualWan 'Microsoft.Network/virtualWans@2021-05-01' = { @description('The principal ID of the created managed identity.') output managedIdentityPrincipalId string = managedIdentity.properties.principalId -@description('The resource ID of the created Virtual WAN') +@description('The resource ID of the created Virtual WAN.') output virtualWWANResourceId string = virtualWan.id From 8b6a69faee88b59fab2298966f7dc06df021c50c Mon Sep 17 00:00:00 2001 From: Alexander Sehr Date: Thu, 29 Sep 2022 12:10:51 +0200 Subject: [PATCH 14/16] Update modules/Microsoft.Network/vpnSites/.test/min/deploy.test.bicep Co-authored-by: Erika Gressi <56914614+eriqua@users.noreply.github.com> --- modules/Microsoft.Network/vpnSites/.test/min/deploy.test.bicep | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/Microsoft.Network/vpnSites/.test/min/deploy.test.bicep b/modules/Microsoft.Network/vpnSites/.test/min/deploy.test.bicep index 595a369c6b..833029f1a7 100644 --- a/modules/Microsoft.Network/vpnSites/.test/min/deploy.test.bicep +++ b/modules/Microsoft.Network/vpnSites/.test/min/deploy.test.bicep @@ -26,7 +26,7 @@ resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { module resourceGroupResources 'dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-nestedDependencies' + name: '${uniqueString(deployment().name, location)}-paramNested' params: { virtualWANName: 'dep-<>-vw-${serviceShort}' } From 470fe7c622143117b135d1e1cbe5e50b80dce629 Mon Sep 17 00:00:00 2001 From: Alexander Sehr Date: Thu, 29 Sep 2022 12:10:57 +0200 Subject: [PATCH 15/16] Update modules/Microsoft.Network/vpnSites/.test/common/deploy.test.bicep Co-authored-by: Erika Gressi <56914614+eriqua@users.noreply.github.com> --- .../Microsoft.Network/vpnSites/.test/common/deploy.test.bicep | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/Microsoft.Network/vpnSites/.test/common/deploy.test.bicep b/modules/Microsoft.Network/vpnSites/.test/common/deploy.test.bicep index 8305c719e5..8bc50db062 100644 --- a/modules/Microsoft.Network/vpnSites/.test/common/deploy.test.bicep +++ b/modules/Microsoft.Network/vpnSites/.test/common/deploy.test.bicep @@ -26,7 +26,7 @@ resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { module resourceGroupResources 'dependencies.bicep' = { scope: resourceGroup - name: '${uniqueString(deployment().name, location)}-nestedDependencies' + name: '${uniqueString(deployment().name, location)}-paramNested' params: { managedIdentityName: 'dep-<>-msi-${serviceShort}' virtualWANName: 'dep-<>-vw-${serviceShort}' From a38b0dc591f52a06638193d15bee3f58b9e905ef Mon Sep 17 00:00:00 2001 From: MrMCake Date: Thu, 29 Sep 2022 12:16:10 +0200 Subject: [PATCH 16/16] Updated readme --- modules/Microsoft.Network/vpnSites/readme.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/modules/Microsoft.Network/vpnSites/readme.md b/modules/Microsoft.Network/vpnSites/readme.md index bc2bf88595..25676d5e8a 100644 --- a/modules/Microsoft.Network/vpnSites/readme.md +++ b/modules/Microsoft.Network/vpnSites/readme.md @@ -343,10 +343,10 @@ The following module usage examples are retrieved from the content of the files ```bicep module vpnSites './Microsoft.Network/vpnSites/deploy.bicep' = { - name: '${uniqueString(deployment().name)}-test-nvsicom' + name: '${uniqueString(deployment().name)}-test-nvscom' params: { // Required parameters - name: '<>-nvsicom' + name: '<>-nvscom' virtualWanId: '' // Non-required parameters deviceProperties: { @@ -374,7 +374,7 @@ module vpnSites './Microsoft.Network/vpnSites/deploy.bicep' = { } vpnSiteLinks: [ { - name: '<>-vSite-nvsicom' + name: '<>-vSite-nvscom' properties: { bgpProperties: { asn: 65010 @@ -420,7 +420,7 @@ module vpnSites './Microsoft.Network/vpnSites/deploy.bicep' = { "parameters": { // Required parameters "name": { - "value": "<>-nvsicom" + "value": "<>-nvscom" }, "virtualWanId": { "value": "" @@ -462,7 +462,7 @@ module vpnSites './Microsoft.Network/vpnSites/deploy.bicep' = { "vpnSiteLinks": { "value": [ { - "name": "<>-vSite-nvsicom", + "name": "<>-vSite-nvscom", "properties": { "bgpProperties": { "asn": 65010, @@ -506,10 +506,10 @@ module vpnSites './Microsoft.Network/vpnSites/deploy.bicep' = { ```bicep module vpnSites './Microsoft.Network/vpnSites/deploy.bicep' = { - name: '${uniqueString(deployment().name)}-test-nvsimin' + name: '${uniqueString(deployment().name)}-test-nvsmin' params: { // Required parameters - name: '<>-nvsimin' + name: '<>-nvsmin' virtualWanId: '' // Non-required parameters addressPrefixes: [ @@ -534,7 +534,7 @@ module vpnSites './Microsoft.Network/vpnSites/deploy.bicep' = { "parameters": { // Required parameters "name": { - "value": "<>-nvsimin" + "value": "<>-nvsmin" }, "virtualWanId": { "value": ""