Skip to content

Commit d38091a

Browse files
authored
Fix to only include non-empty ExtendedLocation (#22630)
* Fix to only include non-empty ExtendedLocation * Updated ChangeLog.md
1 parent 745d6f4 commit d38091a

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

src/Network/Network/ChangeLog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525

2626
## Version 6.1.1
2727
* Onboarded `Microsoft.ElasticSan/elasticSans` to private link cmdlets
28+
* Fixed bug in `New-AzVirtualNetworkGateway` to include only non-empty `ExtendedLocation`
2829

2930
## Version 6.1.0
3031
* Added new cmdlets to get Connection child resource of Network Virtual Appliance.

src/Network/Network/VirtualNetworkGateway/NewAzureVirtualNetworkGatewayCommand.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -419,7 +419,7 @@ private PSVirtualNetworkGateway CreateVirtualNetworkGateway()
419419

420420
}
421421
vnetGateway.GatewayType = this.GatewayType;
422-
if (vnetGateway.GatewayType == "LocalGateway" || vnetGateway.GatewayType == "ExpressRoute")
422+
if (this.ExtendedLocation != null && (vnetGateway.GatewayType == "LocalGateway" || vnetGateway.GatewayType == "ExpressRoute"))
423423
{
424424
vnetGateway.ExtendedLocation = new PSExtendedLocation(this.ExtendedLocation);
425425
vnetGateway.VNetExtendedLocationResourceId = this.VNetExtendedLocationResourceId;

0 commit comments

Comments
 (0)