Skip to content

Commit

Permalink
Expose IP Configurations for Microsoft.Network\VpnGateways (#12315)
Browse files Browse the repository at this point in the history
* new ip configurations

* changelog

* help file

* Update src/Network/Network/Models/Cortex/PSVpnGateway.cs

As per PR suggestion

Co-authored-by: Yeming Liu <[email protected]>

Co-authored-by: Yeming Liu <[email protected]>
  • Loading branch information
henry416 and isra-fel authored Sep 1, 2020
1 parent 7bf263d commit b4ac9f5
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/Network/Network/ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@
- `Get-AzVirtualRouterPeer`
- `Remove-AzVirtualRouterPeer`
* Added RemoteBgpCommunities property to the VirtualNetwork Peering Resource
* Modified the warning message for `New-AzLoadBalancerFrontendIpConfig`, `New-AzPublicIpAddress` and `New-AzPublicIpPrefix`.
* Added VpnGatewayIpConfigurations to `Get-AzVpnGateway` output

## Version 3.3.0
* Added support for AddressPrefixType parameter to `Remove-AzExpressRouteCircuitConnectionConfig`
Expand Down
2 changes: 2 additions & 0 deletions src/Network/Network/Common/NetworkResourceManagerProfile.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1088,6 +1088,7 @@ private static void Initialize()
cfg.CreateMap<CNM.PSVirtualHubRouteTable, MNM.VirtualHubRouteTableV2>();
cfg.CreateMap<CNM.PSVirtualHubRoute, MNM.VirtualHubRouteV2>();
cfg.CreateMap<CNM.PSVpnGateway, MNM.VpnGateway>();
cfg.CreateMap<CNM.PSVpnGatewayIpConfiguration, MNM.VpnGatewayIpConfiguration>();
cfg.CreateMap<CNM.PSVpnSiteLinkConnection, MNM.VpnSiteLinkConnection>();
cfg.CreateMap<CNM.PSVpnSiteLink, MNM.VpnSiteLink>();
cfg.CreateMap<CNM.PSVpnLinkProviderProperties, MNM.VpnLinkProviderProperties>();
Expand Down Expand Up @@ -1121,6 +1122,7 @@ private static void Initialize()
cfg.CreateMap<MNM.VirtualHubRouteTableV2, CNM.PSVirtualHubRouteTable>();
cfg.CreateMap<MNM.VirtualHubRouteV2, CNM.PSVirtualHubRoute>();
cfg.CreateMap<MNM.VpnGateway, CNM.PSVpnGateway>();
cfg.CreateMap<MNM.VpnGatewayIpConfiguration, CNM.PSVpnGatewayIpConfiguration>();
cfg.CreateMap<MNM.VpnConnection, CNM.PSVpnConnection>();
cfg.CreateMap<MNM.VpnSite, CNM.PSVpnSite>().AfterMap((src, dest) =>
{
Expand Down
4 changes: 3 additions & 1 deletion src/Network/Network/Models/Cortex/PSVpnGateway.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,7 @@ public class PSVpnGateway : PSTopLevelResource

[Ps1Xml(Label = "Provisioning State", Target = ViewControl.Table)]
public string ProvisioningState { get; set; }

public List<PSVpnGatewayIpConfiguration> IpConfigurations { get; set;}
}
}
}
25 changes: 25 additions & 0 deletions src/Network/Network/Models/Cortex/PSVpnGatewayIpConfiguration.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
// ----------------------------------------------------------------------------------
//
// Copyright Microsoft Corporation
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// ----------------------------------------------------------------------------------

namespace Microsoft.Azure.Commands.Network.Models
{
public class PSVpnGatewayIpConfiguration
{
public string Id { get; set; }

public string PublicIpAddress { get; set; }

public string PrivateIpAddress { get; set; }
}
}
3 changes: 3 additions & 0 deletions src/Network/Network/help/Get-AzVpnGateway.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ Location : West US
VpnGatewayScaleUnit : 2
VirtualHub : /subscriptions/{subscriptionId}/resourceGroups/Ali_pS_Test/providers/Microsoft.Network/virtualHubs/westushub
BgpSettings : {}
IpConfigurations : {Instance0, Instance1}
Type : Microsoft.Network/vpnGateways
ProvisioningState : Succeeded
```
Expand All @@ -65,6 +66,7 @@ Location : West US
VpnGatewayScaleUnit : 2
VirtualHub : /subscriptions/{subscriptionId}/resourceGroups/Ali_pS_Test/providers/Microsoft.Network/virtualHubs/westushub
BgpSettings : {}
IpConfigurations : {Instance0, Instance1}
Type : Microsoft.Network/vpnGateways
ProvisioningState : Succeeded
Expand All @@ -75,6 +77,7 @@ Location : West US
VpnGatewayScaleUnit : 2
VirtualHub : /subscriptions/{subscriptionId}/resourceGroups/Ali_pS_Test/providers/Microsoft.Network/virtualHubs/westushub
BgpSettings : {}
IpConfigurations : {Instance0, Instance1}
Type : Microsoft.Network/vpnGateways
ProvisioningState : Succeeded
```
Expand Down

0 comments on commit b4ac9f5

Please sign in to comment.