Skip to content

Commit

Permalink
Fix to only include non-empty ExtendedLocation (#22630)
Browse files Browse the repository at this point in the history
* Fix to only include non-empty ExtendedLocation

* Updated ChangeLog.md
  • Loading branch information
myun12580 authored Aug 23, 2023
1 parent 745d6f4 commit d38091a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/Network/Network/ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@

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

## Version 6.1.0
* Added new cmdlets to get Connection child resource of Network Virtual Appliance.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -419,7 +419,7 @@ private PSVirtualNetworkGateway CreateVirtualNetworkGateway()

}
vnetGateway.GatewayType = this.GatewayType;
if (vnetGateway.GatewayType == "LocalGateway" || vnetGateway.GatewayType == "ExpressRoute")
if (this.ExtendedLocation != null && (vnetGateway.GatewayType == "LocalGateway" || vnetGateway.GatewayType == "ExpressRoute"))
{
vnetGateway.ExtendedLocation = new PSExtendedLocation(this.ExtendedLocation);
vnetGateway.VNetExtendedLocationResourceId = this.VNetExtendedLocationResourceId;
Expand Down

0 comments on commit d38091a

Please sign in to comment.