Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
e6805a2
[Modules] Updated Network/VPNGateways to new dependency approach
AlexanderSehr Aug 30, 2022
8592072
Merge branch 'main' into users/alsehr/1791_Network_VPNGateways
AlexanderSehr Sep 1, 2022
e82c8a0
Update to latest
AlexanderSehr Sep 1, 2022
37a3930
Merge branch 'main' into users/alsehr/1791_Network_VPNGateways
AlexanderSehr Sep 2, 2022
14a166a
Updated docs
AlexanderSehr Sep 5, 2022
e4ed801
Updated folder default to common.
AlexanderSehr Sep 8, 2022
99835fc
Update to latest
AlexanderSehr Sep 9, 2022
2de4a80
Update to latest
AlexanderSehr Sep 9, 2022
de49c20
Update to latest
AlexanderSehr Sep 9, 2022
5305ad3
Update to latest
AlexanderSehr Sep 9, 2022
ce0f3c5
Update modules/Microsoft.Network/vpnGateways/.test/common/deploy.test…
AlexanderSehr Sep 19, 2022
d6de4a8
Update modules/Microsoft.Network/vpnGateways/.test/min/deploy.test.bicep
AlexanderSehr Sep 19, 2022
0791b19
Update to latest
AlexanderSehr Sep 19, 2022
a673644
Update to latest
AlexanderSehr Oct 5, 2022
f5f9960
Update to latest
AlexanderSehr Nov 3, 2022
e64bf2e
Update to latest
AlexanderSehr Nov 4, 2022
bc857b3
Update to latest
AlexanderSehr Nov 4, 2022
5a9ecf9
minor fix
AlexanderSehr Nov 4, 2022
97c7852
Update to latest
AlexanderSehr Nov 4, 2022
8d1e6cf
another test without routing info
AlexanderSehr Nov 4, 2022
4d2f266
Merge branch 'main' into users/alsehr/1791_Network_VPNGateways
AlexanderSehr Nov 18, 2022
b9f3936
Small IP adjustments
AlexanderSehr Nov 18, 2022
8b7c388
latest test
AlexanderSehr Nov 19, 2022
9cb0cb2
Merge branch 'main' into users/alsehr/1791_Network_VPNGateways
AlexanderSehr Nov 23, 2022
397e0ca
Update to latest
AlexanderSehr Nov 23, 2022
31ac114
Working example
AlexanderSehr Nov 23, 2022
8e1572f
Fallback to working example
AlexanderSehr Nov 24, 2022
d3b7339
Updated dependency
AlexanderSehr Nov 25, 2022
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
3 changes: 1 addition & 2 deletions .github/workflows/ms.network.vpngateways.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}'
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
@description('Optional. The location to deploy resources to.')
param location string = resourceGroup().location

@description('Optional. The name of the Virtual Hub to create.')
param virtualHubName string

@description('Optional. The name of the VPN Site to create.')
param vpnSiteName string

@description('Required. The name of the virtual WAN to create.')
param virtualWANName string

resource virtualWan 'Microsoft.Network/virtualWans@2021-05-01' = {
name: virtualWANName
location: location
}

resource virtualHub 'Microsoft.Network/virtualHubs@2022-01-01' = {
name: virtualHubName
location: location
properties: {
virtualWan: {
id: virtualWan.id
}
addressPrefix: '10.0.0.0/24'
}
}

resource vpnSite 'Microsoft.Network/vpnSites@2022-01-01' = {
name: vpnSiteName
location: location
properties: {
virtualWan: {
id: virtualWan.id
}
addressSpace: {
addressPrefixes: [
'10.1.0.0/16'
]
}
ipAddress: '10.1.0.0'
}
}

@description('The resource ID of the created Virtual Hub.')
output virtualHubResourceId string = virtualHub.id

@description('The resource ID of the created VPN site.')
output vpnSiteResourceId string = vpnSite.id
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
targetScope = 'subscription'

// ========== //
// Parameters //
// ========== //
@description('Optional. The name of the resource group to deploy for testing purposes.')
@maxLength(90)
param resourceGroupName string = 'ms.network.vpngateways-${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 = 'nvgcom'

// =========== //
// 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)}-paramNested'
params: {
virtualHubName: 'dep-<<namePrefix>>-vh-${serviceShort}'
virtualWANName: 'dep-<<namePrefix>>-vw-${serviceShort}'
vpnSiteName: 'dep-<<namePrefix>>-vs-${serviceShort}'
}
}

// ============== //
// Test Execution //
// ============== //
module testDeployment '../../deploy.bicep' = {
scope: resourceGroup
name: '${uniqueString(deployment().name)}-test-${serviceShort}'
params: {
name: '<<namePrefix>>${serviceShort}001'
virtualHubResourceId: resourceGroupResources.outputs.virtualHubResourceId
bgpSettings: {
asn: 65515
peerWeight: 0
}
connections: [
{
connectionBandwidth: 100
enableBgp: false
name: 'Connection-${last(split(resourceGroupResources.outputs.vpnSiteResourceId, '/'))}'
remoteVpnSiteResourceId: resourceGroupResources.outputs.vpnSiteResourceId
enableInternetSecurity: true
vpnConnectionProtocolType: 'IKEv2'
enableRateLimiting: false
useLocalAzureIpAddress: false
usePolicyBasedTrafficSelectors: false
routingWeight: 0
}
]
lock: 'CanNotDelete'
natRules: [
{
externalMappings: [
{
addressSpace: '192.168.21.0/24'
}
]
internalMappings: [
{
addressSpace: '10.4.0.0/24'
}
]
mode: 'EgressSnat'
name: 'natRule1'
type: 'Static'
}
]
}
}
12 changes: 0 additions & 12 deletions modules/Microsoft.Network/vpnGateways/.test/min.parameters.json

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
@description('Optional. The location to deploy resources to.')
param location string = resourceGroup().location

@description('Optional. The name of the Virtual Hub to create.')
param virtualHubName string

@description('Required. The name of the virtual WAN to create.')
param virtualWANName string

resource virtualWan 'Microsoft.Network/virtualWans@2021-05-01' = {
name: virtualWANName
location: location
}

resource virtualHub 'Microsoft.Network/virtualHubs@2022-01-01' = {
name: virtualHubName
location: location
properties: {
virtualWan: {
id: virtualWan.id
}
addressPrefix: '10.1.0.0/16'
}
}

@description('The resource ID of the created Virtual Hub.')
output virtualHubResourceId string = virtualHub.id
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
targetScope = 'subscription'

// ========== //
// Parameters //
// ========== //
@description('Optional. The name of the resource group to deploy for testing purposes.')
@maxLength(90)
param resourceGroupName string = 'ms.network.vpngateways-${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 = 'nvgmin'

// =========== //
// 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)}-paramNested'
params: {
virtualHubName: 'dep-<<namePrefix>>-vh-${serviceShort}'
virtualWANName: 'dep-<<namePrefix>>-vw-${serviceShort}'
}
}

// ============== //
// Test Execution //
// ============== //

module testDeployment '../../deploy.bicep' = {
scope: resourceGroup
name: '${uniqueString(deployment().name)}-test-${serviceShort}'
params: {
name: '<<namePrefix>>${serviceShort}001'
virtualHubResourceId: resourceGroupResources.outputs.virtualHubResourceId
}
}
68 changes: 0 additions & 68 deletions modules/Microsoft.Network/vpnGateways/.test/parameters.json

This file was deleted.

Loading