Skip to content

Commit 520c21b

Browse files
committed
add obsolete message
1 parent ada7342 commit 520c21b

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/ResourceManager/Network/Commands.Network/VirtualNetwork/Peering/AddAzureVirtualNetworkPeeringCommand.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ public class AddAzureVirtualNetworkPeeringCommand : VirtualNetworkPeeringBase
5252
HelpMessage = "Flag to allow the forwarded traffic from the VMs in the remote virtual network")]
5353
public SwitchParameter AllowForwardedTraffic { get; set; }
5454

55+
[Obsolete("Add-AzureRmVirtualNetworkPeering: -AlloowGatewayTransit will be removed in an upcoming breaking change release. Please start using -AllowGatewayTransit to avoid breaking scripts.")]
5556
[Alias("AlloowGatewayTransit")]
5657
[Parameter(
5758
Mandatory = false,
@@ -95,7 +96,9 @@ private PSVirtualNetworkPeering AddVirtualNetworkPeering()
9596
}
9697

9798
vnetPeering.AllowVirtualNetworkAccess = !this.BlockVirtualNetworkAccess.IsPresent;
99+
#pragma warning disable CS0618
98100
vnetPeering.AllowGatewayTransit = this.AllowGatewayTransit;
101+
#pragma warning restore CS0618
99102
vnetPeering.AllowForwardedTraffic = this.AllowForwardedTraffic;
100103
vnetPeering.UseRemoteGateways = this.UseRemoteGateways;
101104

0 commit comments

Comments
 (0)