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

We recommend using Azure Native.

Azure v6.10.0 published on Tuesday, Nov 19, 2024 by Pulumi

azure.network.getLocalNetworkGateway

Explore with Pulumi AI

azure logo

We recommend using Azure Native.

Azure v6.10.0 published on Tuesday, Nov 19, 2024 by Pulumi

    Use this data source to access information about an existing Local Network Gateway.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as azure from "@pulumi/azure";
    
    const example = azure.network.getLocalNetworkGateway({
        name: "existing-local-network-gateway",
        resourceGroupName: "existing-resources",
    });
    export const id = example.then(example => example.id);
    
    import pulumi
    import pulumi_azure as azure
    
    example = azure.network.get_local_network_gateway(name="existing-local-network-gateway",
        resource_group_name="existing-resources")
    pulumi.export("id", example.id)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/network"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		example, err := network.LookupLocalNetworkGateway(ctx, &network.LookupLocalNetworkGatewayArgs{
    			Name:              "existing-local-network-gateway",
    			ResourceGroupName: "existing-resources",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		ctx.Export("id", example.Id)
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Azure = Pulumi.Azure;
    
    return await Deployment.RunAsync(() => 
    {
        var example = Azure.Network.GetLocalNetworkGateway.Invoke(new()
        {
            Name = "existing-local-network-gateway",
            ResourceGroupName = "existing-resources",
        });
    
        return new Dictionary<string, object?>
        {
            ["id"] = example.Apply(getLocalNetworkGatewayResult => getLocalNetworkGatewayResult.Id),
        };
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.azure.network.NetworkFunctions;
    import com.pulumi.azure.network.inputs.GetLocalNetworkGatewayArgs;
    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) {
            final var example = NetworkFunctions.getLocalNetworkGateway(GetLocalNetworkGatewayArgs.builder()
                .name("existing-local-network-gateway")
                .resourceGroupName("existing-resources")
                .build());
    
            ctx.export("id", example.applyValue(getLocalNetworkGatewayResult -> getLocalNetworkGatewayResult.id()));
        }
    }
    
    variables:
      example:
        fn::invoke:
          Function: azure:network:getLocalNetworkGateway
          Arguments:
            name: existing-local-network-gateway
            resourceGroupName: existing-resources
    outputs:
      id: ${example.id}
    

    Using getLocalNetworkGateway

    Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

    function getLocalNetworkGateway(args: GetLocalNetworkGatewayArgs, opts?: InvokeOptions): Promise<GetLocalNetworkGatewayResult>
    function getLocalNetworkGatewayOutput(args: GetLocalNetworkGatewayOutputArgs, opts?: InvokeOptions): Output<GetLocalNetworkGatewayResult>
    def get_local_network_gateway(name: Optional[str] = None,
                                  resource_group_name: Optional[str] = None,
                                  opts: Optional[InvokeOptions] = None) -> GetLocalNetworkGatewayResult
    def get_local_network_gateway_output(name: Optional[pulumi.Input[str]] = None,
                                  resource_group_name: Optional[pulumi.Input[str]] = None,
                                  opts: Optional[InvokeOptions] = None) -> Output[GetLocalNetworkGatewayResult]
    func LookupLocalNetworkGateway(ctx *Context, args *LookupLocalNetworkGatewayArgs, opts ...InvokeOption) (*LookupLocalNetworkGatewayResult, error)
    func LookupLocalNetworkGatewayOutput(ctx *Context, args *LookupLocalNetworkGatewayOutputArgs, opts ...InvokeOption) LookupLocalNetworkGatewayResultOutput

    > Note: This function is named LookupLocalNetworkGateway in the Go SDK.

    public static class GetLocalNetworkGateway 
    {
        public static Task<GetLocalNetworkGatewayResult> InvokeAsync(GetLocalNetworkGatewayArgs args, InvokeOptions? opts = null)
        public static Output<GetLocalNetworkGatewayResult> Invoke(GetLocalNetworkGatewayInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetLocalNetworkGatewayResult> getLocalNetworkGateway(GetLocalNetworkGatewayArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: azure:network/getLocalNetworkGateway:getLocalNetworkGateway
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Name string
    The name of the Local Network Gateway.
    ResourceGroupName string
    The name of the Resource Group where the Local Network Gateway exists.
    Name string
    The name of the Local Network Gateway.
    ResourceGroupName string
    The name of the Resource Group where the Local Network Gateway exists.
    name String
    The name of the Local Network Gateway.
    resourceGroupName String
    The name of the Resource Group where the Local Network Gateway exists.
    name string
    The name of the Local Network Gateway.
    resourceGroupName string
    The name of the Resource Group where the Local Network Gateway exists.
    name str
    The name of the Local Network Gateway.
    resource_group_name str
    The name of the Resource Group where the Local Network Gateway exists.
    name String
    The name of the Local Network Gateway.
    resourceGroupName String
    The name of the Resource Group where the Local Network Gateway exists.

    getLocalNetworkGateway Result

    The following output properties are available:

    AddressSpaces List<string>
    The list of string CIDRs representing the address spaces the gateway exposes.
    BgpSettings List<GetLocalNetworkGatewayBgpSetting>
    A bgp_settings block as defined below containing the Local Network Gateway's BGP speaker settings.
    GatewayAddress string
    The gateway IP address the Local Network Gateway uses.
    GatewayFqdn string
    The gateway FQDN the Local Network Gateway uses.
    Id string
    The provider-assigned unique ID for this managed resource.
    Location string
    The Azure Region where the Local Network Gateway exists.
    Name string
    ResourceGroupName string
    Tags Dictionary<string, string>
    A mapping of tags assigned to the Local Network Gateway.
    AddressSpaces []string
    The list of string CIDRs representing the address spaces the gateway exposes.
    BgpSettings []GetLocalNetworkGatewayBgpSetting
    A bgp_settings block as defined below containing the Local Network Gateway's BGP speaker settings.
    GatewayAddress string
    The gateway IP address the Local Network Gateway uses.
    GatewayFqdn string
    The gateway FQDN the Local Network Gateway uses.
    Id string
    The provider-assigned unique ID for this managed resource.
    Location string
    The Azure Region where the Local Network Gateway exists.
    Name string
    ResourceGroupName string
    Tags map[string]string
    A mapping of tags assigned to the Local Network Gateway.
    addressSpaces List<String>
    The list of string CIDRs representing the address spaces the gateway exposes.
    bgpSettings List<GetLocalNetworkGatewayBgpSetting>
    A bgp_settings block as defined below containing the Local Network Gateway's BGP speaker settings.
    gatewayAddress String
    The gateway IP address the Local Network Gateway uses.
    gatewayFqdn String
    The gateway FQDN the Local Network Gateway uses.
    id String
    The provider-assigned unique ID for this managed resource.
    location String
    The Azure Region where the Local Network Gateway exists.
    name String
    resourceGroupName String
    tags Map<String,String>
    A mapping of tags assigned to the Local Network Gateway.
    addressSpaces string[]
    The list of string CIDRs representing the address spaces the gateway exposes.
    bgpSettings GetLocalNetworkGatewayBgpSetting[]
    A bgp_settings block as defined below containing the Local Network Gateway's BGP speaker settings.
    gatewayAddress string
    The gateway IP address the Local Network Gateway uses.
    gatewayFqdn string
    The gateway FQDN the Local Network Gateway uses.
    id string
    The provider-assigned unique ID for this managed resource.
    location string
    The Azure Region where the Local Network Gateway exists.
    name string
    resourceGroupName string
    tags {[key: string]: string}
    A mapping of tags assigned to the Local Network Gateway.
    address_spaces Sequence[str]
    The list of string CIDRs representing the address spaces the gateway exposes.
    bgp_settings Sequence[GetLocalNetworkGatewayBgpSetting]
    A bgp_settings block as defined below containing the Local Network Gateway's BGP speaker settings.
    gateway_address str
    The gateway IP address the Local Network Gateway uses.
    gateway_fqdn str
    The gateway FQDN the Local Network Gateway uses.
    id str
    The provider-assigned unique ID for this managed resource.
    location str
    The Azure Region where the Local Network Gateway exists.
    name str
    resource_group_name str
    tags Mapping[str, str]
    A mapping of tags assigned to the Local Network Gateway.
    addressSpaces List<String>
    The list of string CIDRs representing the address spaces the gateway exposes.
    bgpSettings List<Property Map>
    A bgp_settings block as defined below containing the Local Network Gateway's BGP speaker settings.
    gatewayAddress String
    The gateway IP address the Local Network Gateway uses.
    gatewayFqdn String
    The gateway FQDN the Local Network Gateway uses.
    id String
    The provider-assigned unique ID for this managed resource.
    location String
    The Azure Region where the Local Network Gateway exists.
    name String
    resourceGroupName String
    tags Map<String>
    A mapping of tags assigned to the Local Network Gateway.

    Supporting Types

    GetLocalNetworkGatewayBgpSetting

    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.

    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 v6.10.0 published on Tuesday, Nov 19, 2024 by Pulumi