Class VirtualNetworkGateway


  • public class VirtualNetworkGateway
    extends com.pulumi.resources.CustomResource
    A common class for general resource information. Azure REST API version: 2023-02-01. Prior API version in Azure Native 1.x: 2020-11-01. Other available API versions: 2016-06-01, 2016-09-01, 2019-08-01, 2023-04-01, 2023-05-01, 2023-06-01, 2023-09-01. ## Example Usage ### UpdateVirtualNetworkGateway ```java package generated_program; import com.pulumi.Context; import com.pulumi.Pulumi; import com.pulumi.core.Output; import com.pulumi.azurenative.network.VirtualNetworkGateway; import com.pulumi.azurenative.network.VirtualNetworkGatewayArgs; import java.util.List; import java.util.ArrayList; import java.util.Map; import java.io.File; import java.nio.file.Files; import java.nio.file.Paths; public class App { public static void main(String[] args) { Pulumi.run(App::stack); } public static void stack(Context ctx) { var virtualNetworkGateway = new VirtualNetworkGateway("virtualNetworkGateway", VirtualNetworkGatewayArgs.builder() .activeActive(false) .allowRemoteVnetTraffic(false) .allowVirtualWanTraffic(false) .bgpSettings(Map.ofEntries( Map.entry("asn", 65515), Map.entry("bgpPeeringAddress", "10.0.1.30"), Map.entry("peerWeight", 0) )) .customRoutes(Map.of("addressPrefixes", "101.168.0.6/32")) .disableIPSecReplayProtection(false) .enableBgp(false) .enableBgpRouteTranslationForNat(false) .enableDnsForwarding(true) .gatewayType("Vpn") .ipConfigurations(Map.ofEntries( Map.entry("name", "gwipconfig1"), Map.entry("privateIPAllocationMethod", "Dynamic"), Map.entry("publicIPAddress", Map.of("id", "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/gwpip")), Map.entry("subnet", Map.of("id", "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/GatewaySubnet")) )) .location("centralus") .natRules( Map.ofEntries( Map.entry("externalMappings", Map.of("addressSpace", "50.0.0.0/24")), Map.entry("id", "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworkGateways/vpngw/natRules/natRule1"), Map.entry("internalMappings", Map.of("addressSpace", "10.10.0.0/24")), Map.entry("ipConfigurationId", ""), Map.entry("mode", "EgressSnat"), Map.entry("name", "natRule1"), Map.entry("type", "Static") ), Map.ofEntries( Map.entry("externalMappings", Map.of("addressSpace", "30.0.0.0/24")), Map.entry("id", "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworkGateways/vpngw/natRules/natRule2"), Map.entry("internalMappings", Map.of("addressSpace", "20.10.0.0/24")), Map.entry("ipConfigurationId", ""), Map.entry("mode", "IngressSnat"), Map.entry("name", "natRule2"), Map.entry("type", "Static") )) .resourceGroupName("rg1") .sku(Map.ofEntries( Map.entry("name", "VpnGw1"), Map.entry("tier", "VpnGw1") )) .virtualNetworkGatewayName("vpngw") .vpnClientConfiguration(Map.ofEntries( Map.entry("radiusServers", Map.ofEntries( Map.entry("radiusServerAddress", "10.2.0.0"), Map.entry("radiusServerScore", 20), Map.entry("radiusServerSecret", "radiusServerSecret") )), Map.entry("vpnClientProtocols", "OpenVPN"), Map.entry("vpnClientRevokedCertificates", ), Map.entry("vpnClientRootCertificates", ) )) .vpnType("RouteBased") .build()); } } ``` ## Import An existing resource can be imported using its type token, name, and identifier, e.g. ```sh $ pulumi import azure-native:network:VirtualNetworkGateway vpngw /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName} ```
    • Constructor Detail

      • VirtualNetworkGateway

        public VirtualNetworkGateway​(java.lang.String name)
        Parameters:
        name - The _unique_ name of the resulting resource.
      • VirtualNetworkGateway

        public VirtualNetworkGateway​(java.lang.String name,
                                     VirtualNetworkGatewayArgs args)
        Parameters:
        name - The _unique_ name of the resulting resource.
        args - The arguments to use to populate this resource's properties.
      • VirtualNetworkGateway

        public VirtualNetworkGateway​(java.lang.String name,
                                     VirtualNetworkGatewayArgs args,
                                     @Nullable
                                     com.pulumi.resources.CustomResourceOptions options)
        Parameters:
        name - The _unique_ name of the resulting resource.
        args - The arguments to use to populate this resource's properties.
        options - A bag of options that control this resource's behavior.
    • Method Detail

      • activeActive

        public com.pulumi.core.Output<java.util.Optional<java.lang.Boolean>> activeActive()
        Returns:
        ActiveActive flag.
      • adminState

        public com.pulumi.core.Output<java.util.Optional<java.lang.String>> adminState()
        Returns:
        Property to indicate if the Express Route Gateway serves traffic when there are multiple Express Route Gateways in the vnet
      • allowRemoteVnetTraffic

        public com.pulumi.core.Output<java.util.Optional<java.lang.Boolean>> allowRemoteVnetTraffic()
        Returns:
        Configure this gateway to accept traffic from other Azure Virtual Networks. This configuration does not support connectivity to Azure Virtual WAN.
      • allowVirtualWanTraffic

        public com.pulumi.core.Output<java.util.Optional<java.lang.Boolean>> allowVirtualWanTraffic()
        Returns:
        Configures this gateway to accept traffic from remote Virtual WAN networks.
      • bgpSettings

        public com.pulumi.core.Output<java.util.Optional<BgpSettingsResponse>> bgpSettings()
        Returns:
        Virtual network gateway's BGP speaker settings.
      • customRoutes

        public com.pulumi.core.Output<java.util.Optional<AddressSpaceResponse>> customRoutes()
        Returns:
        The reference to the address space resource which represents the custom routes address space specified by the customer for virtual network gateway and VpnClient.
      • disableIPSecReplayProtection

        public com.pulumi.core.Output<java.util.Optional<java.lang.Boolean>> disableIPSecReplayProtection()
        Returns:
        disableIPSecReplayProtection flag.
      • enableBgp

        public com.pulumi.core.Output<java.util.Optional<java.lang.Boolean>> enableBgp()
        Returns:
        Whether BGP is enabled for this virtual network gateway or not.
      • enableBgpRouteTranslationForNat

        public com.pulumi.core.Output<java.util.Optional<java.lang.Boolean>> enableBgpRouteTranslationForNat()
        Returns:
        EnableBgpRouteTranslationForNat flag.
      • enableDnsForwarding

        public com.pulumi.core.Output<java.util.Optional<java.lang.Boolean>> enableDnsForwarding()
        Returns:
        Whether dns forwarding is enabled or not.
      • enablePrivateIpAddress

        public com.pulumi.core.Output<java.util.Optional<java.lang.Boolean>> enablePrivateIpAddress()
        Returns:
        Whether private IP needs to be enabled on this gateway for connections or not.
      • etag

        public com.pulumi.core.Output<java.lang.String> etag()
        Returns:
        A unique read-only string that changes whenever the resource is updated.
      • extendedLocation

        public com.pulumi.core.Output<java.util.Optional<ExtendedLocationResponse>> extendedLocation()
        Returns:
        The extended location of type local virtual network gateway.
      • gatewayDefaultSite

        public com.pulumi.core.Output<java.util.Optional<SubResourceResponse>> gatewayDefaultSite()
        Returns:
        The reference to the LocalNetworkGateway resource which represents local network site having default routes. Assign Null value in case of removing existing default site setting.
      • gatewayType

        public com.pulumi.core.Output<java.util.Optional<java.lang.String>> gatewayType()
        Returns:
        The type of this virtual network gateway.
      • inboundDnsForwardingEndpoint

        public com.pulumi.core.Output<java.lang.String> inboundDnsForwardingEndpoint()
        Returns:
        The IP address allocated by the gateway to which dns requests can be sent.
      • location

        public com.pulumi.core.Output<java.util.Optional<java.lang.String>> location()
        Returns:
        Resource location.
      • name

        public com.pulumi.core.Output<java.lang.String> name()
        Returns:
        Resource name.
      • provisioningState

        public com.pulumi.core.Output<java.lang.String> provisioningState()
        Returns:
        The provisioning state of the virtual network gateway resource.
      • resourceGuid

        public com.pulumi.core.Output<java.lang.String> resourceGuid()
        Returns:
        The resource GUID property of the virtual network gateway resource.
      • sku

        public com.pulumi.core.Output<java.util.Optional<VirtualNetworkGatewaySkuResponse>> sku()
        Returns:
        The reference to the VirtualNetworkGatewaySku resource which represents the SKU selected for Virtual network gateway.
      • tags

        public com.pulumi.core.Output<java.util.Optional<java.util.Map<java.lang.String,​java.lang.String>>> tags()
        Returns:
        Resource tags.
      • type

        public com.pulumi.core.Output<java.lang.String> type()
        Returns:
        Resource type.
      • vNetExtendedLocationResourceId

        public com.pulumi.core.Output<java.util.Optional<java.lang.String>> vNetExtendedLocationResourceId()
        Returns:
        Customer vnet resource id. VirtualNetworkGateway of type local gateway is associated with the customer vnet.
      • virtualNetworkGatewayPolicyGroups

        public com.pulumi.core.Output<java.util.Optional<java.util.List<VirtualNetworkGatewayPolicyGroupResponse>>> virtualNetworkGatewayPolicyGroups()
        Returns:
        The reference to the VirtualNetworkGatewayPolicyGroup resource which represents the available VirtualNetworkGatewayPolicyGroup for the gateway.
      • vpnClientConfiguration

        public com.pulumi.core.Output<java.util.Optional<VpnClientConfigurationResponse>> vpnClientConfiguration()
        Returns:
        The reference to the VpnClientConfiguration resource which represents the P2S VpnClient configurations.
      • vpnGatewayGeneration

        public com.pulumi.core.Output<java.util.Optional<java.lang.String>> vpnGatewayGeneration()
        Returns:
        The generation for this VirtualNetworkGateway. Must be None if gatewayType is not VPN.
      • vpnType

        public com.pulumi.core.Output<java.util.Optional<java.lang.String>> vpnType()
        Returns:
        The type of this virtual network gateway.
      • get

        public static VirtualNetworkGateway get​(java.lang.String name,
                                                com.pulumi.core.Output<java.lang.String> id,
                                                @Nullable
                                                com.pulumi.resources.CustomResourceOptions options)
        Get an existing Host resource's state with the given name, ID, and optional extra properties used to qualify the lookup.
        Parameters:
        name - The _unique_ name of the resulting resource.
        id - The _unique_ provider ID of the resource to lookup.
        options - Optional settings to control the behavior of the CustomResource.