1. Packages
  2. Azure Classic
  3. API Docs
  4. network
  5. LocalNetworkGateway

We recommend using Azure Native.

Azure Classic v5.70.0 published on Wednesday, Mar 27, 2024 by Pulumi

azure.network.LocalNetworkGateway

Explore with Pulumi AI

azure logo

We recommend using Azure Native.

Azure Classic v5.70.0 published on Wednesday, Mar 27, 2024 by Pulumi

    Manages a local network gateway connection over which specific connections can be configured.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as azure from "@pulumi/azure";
    
    const example = new azure.core.ResourceGroup("example", {
        name: "localNetworkGWTest",
        location: "West Europe",
    });
    const home = new azure.network.LocalNetworkGateway("home", {
        name: "backHome",
        resourceGroupName: example.name,
        location: example.location,
        gatewayAddress: "12.13.14.15",
        addressSpaces: ["10.0.0.0/16"],
    });
    
    import pulumi
    import pulumi_azure as azure
    
    example = azure.core.ResourceGroup("example",
        name="localNetworkGWTest",
        location="West Europe")
    home = azure.network.LocalNetworkGateway("home",
        name="backHome",
        resource_group_name=example.name,
        location=example.location,
        gateway_address="12.13.14.15",
        address_spaces=["10.0.0.0/16"])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/core"
    	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/network"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
    			Name:     pulumi.String("localNetworkGWTest"),
    			Location: pulumi.String("West Europe"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = network.NewLocalNetworkGateway(ctx, "home", &network.LocalNetworkGatewayArgs{
    			Name:              pulumi.String("backHome"),
    			ResourceGroupName: example.Name,
    			Location:          example.Location,
    			GatewayAddress:    pulumi.String("12.13.14.15"),
    			AddressSpaces: pulumi.StringArray{
    				pulumi.String("10.0.0.0/16"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Azure = Pulumi.Azure;
    
    return await Deployment.RunAsync(() => 
    {
        var example = new Azure.Core.ResourceGroup("example", new()
        {
            Name = "localNetworkGWTest",
            Location = "West Europe",
        });
    
        var home = new Azure.Network.LocalNetworkGateway("home", new()
        {
            Name = "backHome",
            ResourceGroupName = example.Name,
            Location = example.Location,
            GatewayAddress = "12.13.14.15",
            AddressSpaces = new[]
            {
                "10.0.0.0/16",
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.azure.core.ResourceGroup;
    import com.pulumi.azure.core.ResourceGroupArgs;
    import com.pulumi.azure.network.LocalNetworkGateway;
    import com.pulumi.azure.network.LocalNetworkGatewayArgs;
    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 example = new ResourceGroup("example", ResourceGroupArgs.builder()        
                .name("localNetworkGWTest")
                .location("West Europe")
                .build());
    
            var home = new LocalNetworkGateway("home", LocalNetworkGatewayArgs.builder()        
                .name("backHome")
                .resourceGroupName(example.name())
                .location(example.location())
                .gatewayAddress("12.13.14.15")
                .addressSpaces("10.0.0.0/16")
                .build());
    
        }
    }
    
    resources:
      example:
        type: azure:core:ResourceGroup
        properties:
          name: localNetworkGWTest
          location: West Europe
      home:
        type: azure:network:LocalNetworkGateway
        properties:
          name: backHome
          resourceGroupName: ${example.name}
          location: ${example.location}
          gatewayAddress: 12.13.14.15
          addressSpaces:
            - 10.0.0.0/16
    

    Create LocalNetworkGateway Resource

    new LocalNetworkGateway(name: string, args: LocalNetworkGatewayArgs, opts?: CustomResourceOptions);
    @overload
    def LocalNetworkGateway(resource_name: str,
                            opts: Optional[ResourceOptions] = None,
                            address_spaces: Optional[Sequence[str]] = None,
                            bgp_settings: Optional[LocalNetworkGatewayBgpSettingsArgs] = None,
                            gateway_address: Optional[str] = None,
                            gateway_fqdn: Optional[str] = None,
                            location: Optional[str] = None,
                            name: Optional[str] = None,
                            resource_group_name: Optional[str] = None,
                            tags: Optional[Mapping[str, str]] = None)
    @overload
    def LocalNetworkGateway(resource_name: str,
                            args: LocalNetworkGatewayArgs,
                            opts: Optional[ResourceOptions] = None)
    func NewLocalNetworkGateway(ctx *Context, name string, args LocalNetworkGatewayArgs, opts ...ResourceOption) (*LocalNetworkGateway, error)
    public LocalNetworkGateway(string name, LocalNetworkGatewayArgs args, CustomResourceOptions? opts = null)
    public LocalNetworkGateway(String name, LocalNetworkGatewayArgs args)
    public LocalNetworkGateway(String name, LocalNetworkGatewayArgs args, CustomResourceOptions options)
    
    type: azure:network:LocalNetworkGateway
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    name string
    The unique name of the resource.
    args LocalNetworkGatewayArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args LocalNetworkGatewayArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args LocalNetworkGatewayArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args LocalNetworkGatewayArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args LocalNetworkGatewayArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    LocalNetworkGateway Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    The LocalNetworkGateway resource accepts the following input properties:

    ResourceGroupName string
    The name of the resource group in which to create the local network gateway. Changing this forces a new resource to be created.
    AddressSpaces List<string>
    The list of string CIDRs representing the address spaces the gateway exposes.
    BgpSettings LocalNetworkGatewayBgpSettings
    A bgp_settings block as defined below containing the Local Network Gateway's BGP speaker settings.
    GatewayAddress string
    The gateway IP address to connect with.
    GatewayFqdn string

    The gateway FQDN to connect with.

    NOTE: Either gateway_address or gateway_fqdn should be specified.

    Location string
    The location/region where the local network gateway is created. Changing this forces a new resource to be created.
    Name string
    The name of the local network gateway. Changing this forces a new resource to be created.
    Tags Dictionary<string, string>
    A mapping of tags to assign to the resource.
    ResourceGroupName string
    The name of the resource group in which to create the local network gateway. Changing this forces a new resource to be created.
    AddressSpaces []string
    The list of string CIDRs representing the address spaces the gateway exposes.
    BgpSettings LocalNetworkGatewayBgpSettingsArgs
    A bgp_settings block as defined below containing the Local Network Gateway's BGP speaker settings.
    GatewayAddress string
    The gateway IP address to connect with.
    GatewayFqdn string

    The gateway FQDN to connect with.

    NOTE: Either gateway_address or gateway_fqdn should be specified.

    Location string
    The location/region where the local network gateway is created. Changing this forces a new resource to be created.
    Name string
    The name of the local network gateway. Changing this forces a new resource to be created.
    Tags map[string]string
    A mapping of tags to assign to the resource.
    resourceGroupName String
    The name of the resource group in which to create the local network gateway. Changing this forces a new resource to be created.
    addressSpaces List<String>
    The list of string CIDRs representing the address spaces the gateway exposes.
    bgpSettings LocalNetworkGatewayBgpSettings
    A bgp_settings block as defined below containing the Local Network Gateway's BGP speaker settings.
    gatewayAddress String
    The gateway IP address to connect with.
    gatewayFqdn String

    The gateway FQDN to connect with.

    NOTE: Either gateway_address or gateway_fqdn should be specified.

    location String
    The location/region where the local network gateway is created. Changing this forces a new resource to be created.
    name String
    The name of the local network gateway. Changing this forces a new resource to be created.
    tags Map<String,String>
    A mapping of tags to assign to the resource.
    resourceGroupName string
    The name of the resource group in which to create the local network gateway. Changing this forces a new resource to be created.
    addressSpaces string[]
    The list of string CIDRs representing the address spaces the gateway exposes.
    bgpSettings LocalNetworkGatewayBgpSettings
    A bgp_settings block as defined below containing the Local Network Gateway's BGP speaker settings.
    gatewayAddress string
    The gateway IP address to connect with.
    gatewayFqdn string

    The gateway FQDN to connect with.

    NOTE: Either gateway_address or gateway_fqdn should be specified.

    location string
    The location/region where the local network gateway is created. Changing this forces a new resource to be created.
    name string
    The name of the local network gateway. Changing this forces a new resource to be created.
    tags {[key: string]: string}
    A mapping of tags to assign to the resource.
    resource_group_name str
    The name of the resource group in which to create the local network gateway. Changing this forces a new resource to be created.
    address_spaces Sequence[str]
    The list of string CIDRs representing the address spaces the gateway exposes.
    bgp_settings LocalNetworkGatewayBgpSettingsArgs
    A bgp_settings block as defined below containing the Local Network Gateway's BGP speaker settings.
    gateway_address str
    The gateway IP address to connect with.
    gateway_fqdn str

    The gateway FQDN to connect with.

    NOTE: Either gateway_address or gateway_fqdn should be specified.

    location str
    The location/region where the local network gateway is created. Changing this forces a new resource to be created.
    name str
    The name of the local network gateway. Changing this forces a new resource to be created.
    tags Mapping[str, str]
    A mapping of tags to assign to the resource.
    resourceGroupName String
    The name of the resource group in which to create the local network gateway. Changing this forces a new resource to be created.
    addressSpaces List<String>
    The list of string CIDRs representing the address spaces the gateway exposes.
    bgpSettings Property Map
    A bgp_settings block as defined below containing the Local Network Gateway's BGP speaker settings.
    gatewayAddress String
    The gateway IP address to connect with.
    gatewayFqdn String

    The gateway FQDN to connect with.

    NOTE: Either gateway_address or gateway_fqdn should be specified.

    location String
    The location/region where the local network gateway is created. Changing this forces a new resource to be created.
    name String
    The name of the local network gateway. Changing this forces a new resource to be created.
    tags Map<String>
    A mapping of tags to assign to the resource.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the LocalNetworkGateway resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing LocalNetworkGateway Resource

    Get an existing LocalNetworkGateway resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: LocalNetworkGatewayState, opts?: CustomResourceOptions): LocalNetworkGateway
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            address_spaces: Optional[Sequence[str]] = None,
            bgp_settings: Optional[LocalNetworkGatewayBgpSettingsArgs] = None,
            gateway_address: Optional[str] = None,
            gateway_fqdn: Optional[str] = None,
            location: Optional[str] = None,
            name: Optional[str] = None,
            resource_group_name: Optional[str] = None,
            tags: Optional[Mapping[str, str]] = None) -> LocalNetworkGateway
    func GetLocalNetworkGateway(ctx *Context, name string, id IDInput, state *LocalNetworkGatewayState, opts ...ResourceOption) (*LocalNetworkGateway, error)
    public static LocalNetworkGateway Get(string name, Input<string> id, LocalNetworkGatewayState? state, CustomResourceOptions? opts = null)
    public static LocalNetworkGateway get(String name, Output<String> id, LocalNetworkGatewayState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    AddressSpaces List<string>
    The list of string CIDRs representing the address spaces the gateway exposes.
    BgpSettings LocalNetworkGatewayBgpSettings
    A bgp_settings block as defined below containing the Local Network Gateway's BGP speaker settings.
    GatewayAddress string
    The gateway IP address to connect with.
    GatewayFqdn string

    The gateway FQDN to connect with.

    NOTE: Either gateway_address or gateway_fqdn should be specified.

    Location string
    The location/region where the local network gateway is created. Changing this forces a new resource to be created.
    Name string
    The name of the local network gateway. Changing this forces a new resource to be created.
    ResourceGroupName string
    The name of the resource group in which to create the local network gateway. Changing this forces a new resource to be created.
    Tags Dictionary<string, string>
    A mapping of tags to assign to the resource.
    AddressSpaces []string
    The list of string CIDRs representing the address spaces the gateway exposes.
    BgpSettings LocalNetworkGatewayBgpSettingsArgs
    A bgp_settings block as defined below containing the Local Network Gateway's BGP speaker settings.
    GatewayAddress string
    The gateway IP address to connect with.
    GatewayFqdn string

    The gateway FQDN to connect with.

    NOTE: Either gateway_address or gateway_fqdn should be specified.

    Location string
    The location/region where the local network gateway is created. Changing this forces a new resource to be created.
    Name string
    The name of the local network gateway. Changing this forces a new resource to be created.
    ResourceGroupName string
    The name of the resource group in which to create the local network gateway. Changing this forces a new resource to be created.
    Tags map[string]string
    A mapping of tags to assign to the resource.
    addressSpaces List<String>
    The list of string CIDRs representing the address spaces the gateway exposes.
    bgpSettings LocalNetworkGatewayBgpSettings
    A bgp_settings block as defined below containing the Local Network Gateway's BGP speaker settings.
    gatewayAddress String
    The gateway IP address to connect with.
    gatewayFqdn String

    The gateway FQDN to connect with.

    NOTE: Either gateway_address or gateway_fqdn should be specified.

    location String
    The location/region where the local network gateway is created. Changing this forces a new resource to be created.
    name String
    The name of the local network gateway. Changing this forces a new resource to be created.
    resourceGroupName String
    The name of the resource group in which to create the local network gateway. Changing this forces a new resource to be created.
    tags Map<String,String>
    A mapping of tags to assign to the resource.
    addressSpaces string[]
    The list of string CIDRs representing the address spaces the gateway exposes.
    bgpSettings LocalNetworkGatewayBgpSettings
    A bgp_settings block as defined below containing the Local Network Gateway's BGP speaker settings.
    gatewayAddress string
    The gateway IP address to connect with.
    gatewayFqdn string

    The gateway FQDN to connect with.

    NOTE: Either gateway_address or gateway_fqdn should be specified.

    location string
    The location/region where the local network gateway is created. Changing this forces a new resource to be created.
    name string
    The name of the local network gateway. Changing this forces a new resource to be created.
    resourceGroupName string
    The name of the resource group in which to create the local network gateway. Changing this forces a new resource to be created.
    tags {[key: string]: string}
    A mapping of tags to assign to the resource.
    address_spaces Sequence[str]
    The list of string CIDRs representing the address spaces the gateway exposes.
    bgp_settings LocalNetworkGatewayBgpSettingsArgs
    A bgp_settings block as defined below containing the Local Network Gateway's BGP speaker settings.
    gateway_address str
    The gateway IP address to connect with.
    gateway_fqdn str

    The gateway FQDN to connect with.

    NOTE: Either gateway_address or gateway_fqdn should be specified.

    location str
    The location/region where the local network gateway is created. Changing this forces a new resource to be created.
    name str
    The name of the local network gateway. Changing this forces a new resource to be created.
    resource_group_name str
    The name of the resource group in which to create the local network gateway. Changing this forces a new resource to be created.
    tags Mapping[str, str]
    A mapping of tags to assign to the resource.
    addressSpaces List<String>
    The list of string CIDRs representing the address spaces the gateway exposes.
    bgpSettings Property Map
    A bgp_settings block as defined below containing the Local Network Gateway's BGP speaker settings.
    gatewayAddress String
    The gateway IP address to connect with.
    gatewayFqdn String

    The gateway FQDN to connect with.

    NOTE: Either gateway_address or gateway_fqdn should be specified.

    location String
    The location/region where the local network gateway is created. Changing this forces a new resource to be created.
    name String
    The name of the local network gateway. Changing this forces a new resource to be created.
    resourceGroupName String
    The name of the resource group in which to create the local network gateway. Changing this forces a new resource to be created.
    tags Map<String>
    A mapping of tags to assign to the resource.

    Supporting Types

    LocalNetworkGatewayBgpSettings, LocalNetworkGatewayBgpSettingsArgs

    Asn int
    The BGP speaker's ASN.
    BgpPeeringAddress string
    The BGP peering address and BGP identifier of this BGP speaker.
    PeerWeight int
    The weight added to routes learned from this BGP speaker.
    Asn int
    The BGP speaker's ASN.
    BgpPeeringAddress string
    The BGP peering address and BGP identifier of this BGP speaker.
    PeerWeight int
    The weight added to routes learned from this BGP speaker.
    asn Integer
    The BGP speaker's ASN.
    bgpPeeringAddress String
    The BGP peering address and BGP identifier of this BGP speaker.
    peerWeight Integer
    The weight added to routes learned from this BGP speaker.
    asn number
    The BGP speaker's ASN.
    bgpPeeringAddress string
    The BGP peering address and BGP identifier of this BGP speaker.
    peerWeight number
    The weight added to routes learned from this BGP speaker.
    asn int
    The BGP speaker's ASN.
    bgp_peering_address str
    The BGP peering address and BGP identifier of this BGP speaker.
    peer_weight int
    The weight added to routes learned from this BGP speaker.
    asn Number
    The BGP speaker's ASN.
    bgpPeeringAddress String
    The BGP peering address and BGP identifier of this BGP speaker.
    peerWeight Number
    The weight added to routes learned from this BGP speaker.

    Import

    Local Network Gateways can be imported using the resource id, e.g.

    $ pulumi import azure:network/localNetworkGateway:LocalNetworkGateway lng1 /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.Network/localNetworkGateways/lng1
    

    Package Details

    Repository
    Azure Classic pulumi/pulumi-azure
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the azurerm Terraform Provider.
    azure logo

    We recommend using Azure Native.

    Azure Classic v5.70.0 published on Wednesday, Mar 27, 2024 by Pulumi