diff --git a/src/Network/Network.Test/ScenarioTests/CortexTests.ps1 b/src/Network/Network.Test/ScenarioTests/CortexTests.ps1 index dfdb416c2a6c..675b1fec7668 100644 --- a/src/Network/Network.Test/ScenarioTests/CortexTests.ps1 +++ b/src/Network/Network.Test/ScenarioTests/CortexTests.ps1 @@ -49,7 +49,7 @@ function Test-CortexCRUD $virtualWan = Get-AzVirtualWan -ResourceGroupName $rgName -Name $virtualWanName Assert-AreEqual $rgName $virtualWan.ResourceGroupName Assert-AreEqual $virtualWanName $virtualWan.Name - Assert-AreEqual $false $virtualWan.AllowVnetToVnetTraffic + Assert-AreEqual $true $virtualWan.AllowVnetToVnetTraffic Assert-AreEqual $false $virtualWan.AllowBranchToBranchTraffic $virtualWans = Get-AzureRmVirtualWan -ResourceGroupName $rgName diff --git a/src/Network/Network/ChangeLog.md b/src/Network/Network/ChangeLog.md index 02c649d49d8c..3d2ceab1d825 100644 --- a/src/Network/Network/ChangeLog.md +++ b/src/Network/Network/ChangeLog.md @@ -20,6 +20,9 @@ ## Upcoming Release * Fixed incorrect type of SuccessThresholdRoundTripTimeMs parameter for New-AzNetworkWatcherConnectionMonitorTestConfigurationObject +* Updated VirtualWan cmdlets to set default value of AllowVnetToVnetTraffic argument to True. + - `New-AzVirtualWan` + - `Update-AzVirtualWan` ## Version 2.5.0 * Updated cmdlets to enable connection on private IP for Virtual Network Gateway. diff --git a/src/Network/Network/Cortex/VirtualWan/NewAzureRmVirtualWanCommand.cs b/src/Network/Network/Cortex/VirtualWan/NewAzureRmVirtualWanCommand.cs index bbb9d02f8094..6a1a7ac17e2a 100644 --- a/src/Network/Network/Cortex/VirtualWan/NewAzureRmVirtualWanCommand.cs +++ b/src/Network/Network/Cortex/VirtualWan/NewAzureRmVirtualWanCommand.cs @@ -106,7 +106,7 @@ private PSVirtualWan CreateVirtualWan() virtualWan.ResourceGroupName = this.ResourceGroupName; virtualWan.Location = this.Location; virtualWan.AllowBranchToBranchTraffic = this.AllowBranchToBranchTraffic.IsPresent; - virtualWan.AllowVnetToVnetTraffic = this.AllowVnetToVnetTraffic.IsPresent; + virtualWan.AllowVnetToVnetTraffic = true; if(string.IsNullOrWhiteSpace(this.VirtualWANType)) { diff --git a/src/Network/Network/Cortex/VirtualWan/UpdateAzureRmVirtualWanCommand.cs b/src/Network/Network/Cortex/VirtualWan/UpdateAzureRmVirtualWanCommand.cs index 8d8bfde8f5df..5abac30b173c 100644 --- a/src/Network/Network/Cortex/VirtualWan/UpdateAzureRmVirtualWanCommand.cs +++ b/src/Network/Network/Cortex/VirtualWan/UpdateAzureRmVirtualWanCommand.cs @@ -150,7 +150,7 @@ private PSVirtualWan UpdateVirtualWan() if (this.AllowVnetToVnetTraffic.HasValue) { - virtualWanToUpdate.AllowVnetToVnetTraffic = this.AllowVnetToVnetTraffic.Value; + virtualWanToUpdate.AllowVnetToVnetTraffic = true; } if (!string.IsNullOrWhiteSpace(this.VirtualWANType)) diff --git a/src/Network/Network/Cortex/VirtualWan/VirtualWanBaseCmdlet.cs b/src/Network/Network/Cortex/VirtualWan/VirtualWanBaseCmdlet.cs index d36cf65ca609..6ea85be93b88 100644 --- a/src/Network/Network/Cortex/VirtualWan/VirtualWanBaseCmdlet.cs +++ b/src/Network/Network/Cortex/VirtualWan/VirtualWanBaseCmdlet.cs @@ -65,6 +65,7 @@ public PSVirtualWan GetVirtualWan(string resourceGroupName, string name) var virtualWan = this.VirtualWanClient.Get(resourceGroupName, name); var psVirtualWan = ToPsVirtualWan(virtualWan); psVirtualWan.ResourceGroupName = resourceGroupName; + psVirtualWan.AllowVnetToVnetTraffic = true; return psVirtualWan; }