1. Registry
  2. Packages
  3. Netbox Provider
  4. API Docs
  5. getL2vpnTermination
Viewing docs for netbox 6.0.0
published on Wednesday, Nov 4, 2026 by e-breuninger
netbox
Viewing docs for netbox 6.0.0
published on Wednesday, Nov 4, 2026 by e-breuninger

    An L2VPN termination attaching an interface or VLAN to an L2VPN (vpn.l2vpntermination).

    From the official documentation:

    A L2VPN termination is the attachment of an L2VPN to an interface or VLAN. Note that the L2VPNs of the following types may have only two terminations assigned to them:

    • VPWS
    • EPL
    • EP-LAN
    • EP-TREE

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as netbox from "@pulumi/netbox";
    
    const test = netbox.getL2vpnTermination({
        id: 123,
    });
    
    import pulumi
    import pulumi_netbox as netbox
    
    test = netbox.get_l2vpn_termination(id=123)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/netbox/v6/netbox"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := netbox.LookupL2vpnTermination(ctx, &netbox.LookupL2vpnTerminationArgs{
    			Id: pulumi.Float64Ref(123),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Netbox = Pulumi.Netbox;
    
    return await Deployment.RunAsync(() => 
    {
        var test = Netbox.GetL2vpnTermination.Invoke(new()
        {
            Id = 123,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.netbox.NetboxFunctions;
    import com.pulumi.netbox.inputs.GetL2vpnTerminationArgs;
    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 test = NetboxFunctions.getL2vpnTermination(GetL2vpnTerminationArgs.builder()
                .id(123)
                .build());
    
        }
    }
    
    variables:
      test:
        fn::invoke:
          function: netbox:getL2vpnTermination
          arguments:
            id: 123
    
    Example coming soon!
    

    Using getL2vpnTermination

    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 getL2vpnTermination(args: GetL2vpnTerminationArgs, opts?: InvokeOptions): Promise<GetL2vpnTerminationResult>
    function getL2vpnTerminationOutput(args: GetL2vpnTerminationOutputArgs, opts?: InvokeOutputOptions): Output<GetL2vpnTerminationResult>
    def get_l2vpn_termination(custom_field_filters: Optional[Mapping[str, str]] = None,
                              device_interface_id: Optional[float] = None,
                              id: Optional[float] = None,
                              l2vpn_id: Optional[float] = None,
                              tag_slug: Optional[str] = None,
                              virtual_machine_interface_id: Optional[float] = None,
                              vlan_id: Optional[float] = None,
                              opts: Optional[InvokeOptions] = None) -> GetL2vpnTerminationResult
    def get_l2vpn_termination_output(custom_field_filters: pulumi.Input[Optional[Mapping[str, pulumi.Input[str]]]] = None,
                              device_interface_id: pulumi.Input[Optional[float]] = None,
                              id: pulumi.Input[Optional[float]] = None,
                              l2vpn_id: pulumi.Input[Optional[float]] = None,
                              tag_slug: pulumi.Input[Optional[str]] = None,
                              virtual_machine_interface_id: pulumi.Input[Optional[float]] = None,
                              vlan_id: pulumi.Input[Optional[float]] = None,
                              opts: Optional[InvokeOutputOptions] = None) -> Output[GetL2vpnTerminationResult]
    func LookupL2vpnTermination(ctx *Context, args *LookupL2vpnTerminationArgs, opts ...InvokeOption) (*LookupL2vpnTerminationResult, error)
    func LookupL2vpnTerminationOutput(ctx *Context, args *LookupL2vpnTerminationOutputArgs, opts ...InvokeOption) LookupL2vpnTerminationResultOutput

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

    public static class GetL2vpnTermination 
    {
        public static Task<GetL2vpnTerminationResult> InvokeAsync(GetL2vpnTerminationArgs args, InvokeOptions? opts = null)
        public static Output<GetL2vpnTerminationResult> Invoke(GetL2vpnTerminationInvokeArgs args, InvokeOptions? opts = null)
        public static Output<GetL2vpnTerminationResult> Invoke(GetL2vpnTerminationInvokeArgs args, InvokeOutputOptions opts)
    }
    public static CompletableFuture<GetL2vpnTerminationResult> getL2vpnTermination(GetL2vpnTerminationArgs args, InvokeOptions options)
    public static Output<GetL2vpnTerminationResult> getL2vpnTermination(GetL2vpnTerminationArgs args, InvokeOptions options)
    public static Output<GetL2vpnTerminationResult> getL2vpnTermination(GetL2vpnTerminationArgs args, InvokeOutputOptions options)
    
    fn::invoke:
      function: netbox:index/getL2vpnTermination:getL2vpnTermination
      arguments:
        # arguments dictionary
    data "netbox_get_l2vpn_termination" "name" {
        # arguments
    }

    The following arguments are supported:

    CustomFieldFilters Dictionary<string, string>
    Custom field values to match, by field name, e.g. { tier = "gold" }: each entry filters as cf_\n\n with the field's own filter logic, loose (case-insensitive substring) or exact.
    DeviceInterfaceId double
    Id of the terminating device interface (assignedobjecttype dcim.interface). Conflicts with the other aliases and with setting the assigned*object** pair directly.
    Id double
    NetBox id.
    L2vpnId double
    Id of the L2VPN.
    TagSlug string
    Slug of a tag the object carries.
    VirtualMachineInterfaceId double
    Id of the terminating virtual machine interface (assignedobjecttype virtualization.vminterface). Conflicts with the other aliases and with setting the assigned*object** pair directly.
    VlanId double
    Id of the terminating VLAN (assignedobjecttype ipam.vlan). Conflicts with the other aliases and with setting the assigned*object** pair directly.
    CustomFieldFilters map[string]string
    Custom field values to match, by field name, e.g. { tier = "gold" }: each entry filters as cf_\n\n with the field's own filter logic, loose (case-insensitive substring) or exact.
    DeviceInterfaceId float64
    Id of the terminating device interface (assignedobjecttype dcim.interface). Conflicts with the other aliases and with setting the assigned*object** pair directly.
    Id float64
    NetBox id.
    L2vpnId float64
    Id of the L2VPN.
    TagSlug string
    Slug of a tag the object carries.
    VirtualMachineInterfaceId float64
    Id of the terminating virtual machine interface (assignedobjecttype virtualization.vminterface). Conflicts with the other aliases and with setting the assigned*object** pair directly.
    VlanId float64
    Id of the terminating VLAN (assignedobjecttype ipam.vlan). Conflicts with the other aliases and with setting the assigned*object** pair directly.
    custom_field_filters map(string)
    Custom field values to match, by field name, e.g. { tier = "gold" }: each entry filters as cf_\n\n with the field's own filter logic, loose (case-insensitive substring) or exact.
    device_interface_id number
    Id of the terminating device interface (assignedobjecttype dcim.interface). Conflicts with the other aliases and with setting the assigned*object** pair directly.
    id number
    NetBox id.
    l2vpn_id number
    Id of the L2VPN.
    tag_slug string
    Slug of a tag the object carries.
    virtual_machine_interface_id number
    Id of the terminating virtual machine interface (assignedobjecttype virtualization.vminterface). Conflicts with the other aliases and with setting the assigned*object** pair directly.
    vlan_id number
    Id of the terminating VLAN (assignedobjecttype ipam.vlan). Conflicts with the other aliases and with setting the assigned*object** pair directly.
    customFieldFilters Map<String,String>
    Custom field values to match, by field name, e.g. { tier = "gold" }: each entry filters as cf_\n\n with the field's own filter logic, loose (case-insensitive substring) or exact.
    deviceInterfaceId Double
    Id of the terminating device interface (assignedobjecttype dcim.interface). Conflicts with the other aliases and with setting the assigned*object** pair directly.
    id Double
    NetBox id.
    l2vpnId Double
    Id of the L2VPN.
    tagSlug String
    Slug of a tag the object carries.
    virtualMachineInterfaceId Double
    Id of the terminating virtual machine interface (assignedobjecttype virtualization.vminterface). Conflicts with the other aliases and with setting the assigned*object** pair directly.
    vlanId Double
    Id of the terminating VLAN (assignedobjecttype ipam.vlan). Conflicts with the other aliases and with setting the assigned*object** pair directly.
    customFieldFilters {[key: string]: string}
    Custom field values to match, by field name, e.g. { tier = "gold" }: each entry filters as cf_\n\n with the field's own filter logic, loose (case-insensitive substring) or exact.
    deviceInterfaceId number
    Id of the terminating device interface (assignedobjecttype dcim.interface). Conflicts with the other aliases and with setting the assigned*object** pair directly.
    id number
    NetBox id.
    l2vpnId number
    Id of the L2VPN.
    tagSlug string
    Slug of a tag the object carries.
    virtualMachineInterfaceId number
    Id of the terminating virtual machine interface (assignedobjecttype virtualization.vminterface). Conflicts with the other aliases and with setting the assigned*object** pair directly.
    vlanId number
    Id of the terminating VLAN (assignedobjecttype ipam.vlan). Conflicts with the other aliases and with setting the assigned*object** pair directly.
    custom_field_filters Mapping[str, str]
    Custom field values to match, by field name, e.g. { tier = "gold" }: each entry filters as cf_\n\n with the field's own filter logic, loose (case-insensitive substring) or exact.
    device_interface_id float
    Id of the terminating device interface (assignedobjecttype dcim.interface). Conflicts with the other aliases and with setting the assigned*object** pair directly.
    id float
    NetBox id.
    l2vpn_id float
    Id of the L2VPN.
    tag_slug str
    Slug of a tag the object carries.
    virtual_machine_interface_id float
    Id of the terminating virtual machine interface (assignedobjecttype virtualization.vminterface). Conflicts with the other aliases and with setting the assigned*object** pair directly.
    vlan_id float
    Id of the terminating VLAN (assignedobjecttype ipam.vlan). Conflicts with the other aliases and with setting the assigned*object** pair directly.
    customFieldFilters Map<String>
    Custom field values to match, by field name, e.g. { tier = "gold" }: each entry filters as cf_\n\n with the field's own filter logic, loose (case-insensitive substring) or exact.
    deviceInterfaceId Number
    Id of the terminating device interface (assignedobjecttype dcim.interface). Conflicts with the other aliases and with setting the assigned*object** pair directly.
    id Number
    NetBox id.
    l2vpnId Number
    Id of the L2VPN.
    tagSlug String
    Slug of a tag the object carries.
    virtualMachineInterfaceId Number
    Id of the terminating virtual machine interface (assignedobjecttype virtualization.vminterface). Conflicts with the other aliases and with setting the assigned*object** pair directly.
    vlanId Number
    Id of the terminating VLAN (assignedobjecttype ipam.vlan). Conflicts with the other aliases and with setting the assigned*object** pair directly.

    getL2vpnTermination Result

    The following output properties are available:

    AssignedObjectId double
    Id of the terminating object (see assignedobjecttype).
    AssignedObjectType string
    Content type of the terminating object. Derived from deviceinterfaceid, virtualmachineinterfaceid or vlanid when one of those is set; set it together with assignedobjectid otherwise. One assignment is required. One of: dcim.interface, virtualization.vminterface, ipam.vlan.
    Created string
    CustomFields Dictionary<string, string>
    Custom field values by field name. Every value is a string; NetBox coerces numbers and booleans. An object field holds the related object's id, e.g. "12", a multiobject field a JSON list of ids in any order, e.g. jsonencode([12, 13]). A key removed from the map is cleared in NetBox (set {} to clear all).
    DeviceInterfaceId double
    Id of the terminating device interface (assignedobjecttype dcim.interface). Conflicts with the other aliases and with setting the assigned*object** pair directly.
    Id double
    NetBox id.
    L2vpnId double
    Id of the L2VPN.
    LastUpdated string
    Tags List<string>
    Slugs of the tags assigned to the object (the provider's defaulttags are added on top, see tagsall).
    TagsAlls List<string>
    Slugs of all tags on the object, including the provider's default_tags.
    Url string
    VirtualMachineInterfaceId double
    Id of the terminating virtual machine interface (assignedobjecttype virtualization.vminterface). Conflicts with the other aliases and with setting the assigned*object** pair directly.
    VlanId double
    Id of the terminating VLAN (assignedobjecttype ipam.vlan). Conflicts with the other aliases and with setting the assigned*object** pair directly.
    CustomFieldFilters Dictionary<string, string>
    Custom field values to match, by field name, e.g. { tier = "gold" }: each entry filters as cf_\n\n with the field's own filter logic, loose (case-insensitive substring) or exact.
    TagSlug string
    Slug of a tag the object carries.
    AssignedObjectId float64
    Id of the terminating object (see assignedobjecttype).
    AssignedObjectType string
    Content type of the terminating object. Derived from deviceinterfaceid, virtualmachineinterfaceid or vlanid when one of those is set; set it together with assignedobjectid otherwise. One assignment is required. One of: dcim.interface, virtualization.vminterface, ipam.vlan.
    Created string
    CustomFields map[string]string
    Custom field values by field name. Every value is a string; NetBox coerces numbers and booleans. An object field holds the related object's id, e.g. "12", a multiobject field a JSON list of ids in any order, e.g. jsonencode([12, 13]). A key removed from the map is cleared in NetBox (set {} to clear all).
    DeviceInterfaceId float64
    Id of the terminating device interface (assignedobjecttype dcim.interface). Conflicts with the other aliases and with setting the assigned*object** pair directly.
    Id float64
    NetBox id.
    L2vpnId float64
    Id of the L2VPN.
    LastUpdated string
    Tags []string
    Slugs of the tags assigned to the object (the provider's defaulttags are added on top, see tagsall).
    TagsAlls []string
    Slugs of all tags on the object, including the provider's default_tags.
    Url string
    VirtualMachineInterfaceId float64
    Id of the terminating virtual machine interface (assignedobjecttype virtualization.vminterface). Conflicts with the other aliases and with setting the assigned*object** pair directly.
    VlanId float64
    Id of the terminating VLAN (assignedobjecttype ipam.vlan). Conflicts with the other aliases and with setting the assigned*object** pair directly.
    CustomFieldFilters map[string]string
    Custom field values to match, by field name, e.g. { tier = "gold" }: each entry filters as cf_\n\n with the field's own filter logic, loose (case-insensitive substring) or exact.
    TagSlug string
    Slug of a tag the object carries.
    assigned_object_id number
    Id of the terminating object (see assignedobjecttype).
    assigned_object_type string
    Content type of the terminating object. Derived from deviceinterfaceid, virtualmachineinterfaceid or vlanid when one of those is set; set it together with assignedobjectid otherwise. One assignment is required. One of: dcim.interface, virtualization.vminterface, ipam.vlan.
    created string
    custom_fields map(string)
    Custom field values by field name. Every value is a string; NetBox coerces numbers and booleans. An object field holds the related object's id, e.g. "12", a multiobject field a JSON list of ids in any order, e.g. jsonencode([12, 13]). A key removed from the map is cleared in NetBox (set {} to clear all).
    device_interface_id number
    Id of the terminating device interface (assignedobjecttype dcim.interface). Conflicts with the other aliases and with setting the assigned*object** pair directly.
    id number
    NetBox id.
    l2vpn_id number
    Id of the L2VPN.
    last_updated string
    tags list(string)
    Slugs of the tags assigned to the object (the provider's defaulttags are added on top, see tagsall).
    tags_alls list(string)
    Slugs of all tags on the object, including the provider's default_tags.
    url string
    virtual_machine_interface_id number
    Id of the terminating virtual machine interface (assignedobjecttype virtualization.vminterface). Conflicts with the other aliases and with setting the assigned*object** pair directly.
    vlan_id number
    Id of the terminating VLAN (assignedobjecttype ipam.vlan). Conflicts with the other aliases and with setting the assigned*object** pair directly.
    custom_field_filters map(string)
    Custom field values to match, by field name, e.g. { tier = "gold" }: each entry filters as cf_\n\n with the field's own filter logic, loose (case-insensitive substring) or exact.
    tag_slug string
    Slug of a tag the object carries.
    assignedObjectId Double
    Id of the terminating object (see assignedobjecttype).
    assignedObjectType String
    Content type of the terminating object. Derived from deviceinterfaceid, virtualmachineinterfaceid or vlanid when one of those is set; set it together with assignedobjectid otherwise. One assignment is required. One of: dcim.interface, virtualization.vminterface, ipam.vlan.
    created String
    customFields Map<String,String>
    Custom field values by field name. Every value is a string; NetBox coerces numbers and booleans. An object field holds the related object's id, e.g. "12", a multiobject field a JSON list of ids in any order, e.g. jsonencode([12, 13]). A key removed from the map is cleared in NetBox (set {} to clear all).
    deviceInterfaceId Double
    Id of the terminating device interface (assignedobjecttype dcim.interface). Conflicts with the other aliases and with setting the assigned*object** pair directly.
    id Double
    NetBox id.
    l2vpnId Double
    Id of the L2VPN.
    lastUpdated String
    tags List<String>
    Slugs of the tags assigned to the object (the provider's defaulttags are added on top, see tagsall).
    tagsAlls List<String>
    Slugs of all tags on the object, including the provider's default_tags.
    url String
    virtualMachineInterfaceId Double
    Id of the terminating virtual machine interface (assignedobjecttype virtualization.vminterface). Conflicts with the other aliases and with setting the assigned*object** pair directly.
    vlanId Double
    Id of the terminating VLAN (assignedobjecttype ipam.vlan). Conflicts with the other aliases and with setting the assigned*object** pair directly.
    customFieldFilters Map<String,String>
    Custom field values to match, by field name, e.g. { tier = "gold" }: each entry filters as cf_\n\n with the field's own filter logic, loose (case-insensitive substring) or exact.
    tagSlug String
    Slug of a tag the object carries.
    assignedObjectId number
    Id of the terminating object (see assignedobjecttype).
    assignedObjectType string
    Content type of the terminating object. Derived from deviceinterfaceid, virtualmachineinterfaceid or vlanid when one of those is set; set it together with assignedobjectid otherwise. One assignment is required. One of: dcim.interface, virtualization.vminterface, ipam.vlan.
    created string
    customFields {[key: string]: string}
    Custom field values by field name. Every value is a string; NetBox coerces numbers and booleans. An object field holds the related object's id, e.g. "12", a multiobject field a JSON list of ids in any order, e.g. jsonencode([12, 13]). A key removed from the map is cleared in NetBox (set {} to clear all).
    deviceInterfaceId number
    Id of the terminating device interface (assignedobjecttype dcim.interface). Conflicts with the other aliases and with setting the assigned*object** pair directly.
    id number
    NetBox id.
    l2vpnId number
    Id of the L2VPN.
    lastUpdated string
    tags string[]
    Slugs of the tags assigned to the object (the provider's defaulttags are added on top, see tagsall).
    tagsAlls string[]
    Slugs of all tags on the object, including the provider's default_tags.
    url string
    virtualMachineInterfaceId number
    Id of the terminating virtual machine interface (assignedobjecttype virtualization.vminterface). Conflicts with the other aliases and with setting the assigned*object** pair directly.
    vlanId number
    Id of the terminating VLAN (assignedobjecttype ipam.vlan). Conflicts with the other aliases and with setting the assigned*object** pair directly.
    customFieldFilters {[key: string]: string}
    Custom field values to match, by field name, e.g. { tier = "gold" }: each entry filters as cf_\n\n with the field's own filter logic, loose (case-insensitive substring) or exact.
    tagSlug string
    Slug of a tag the object carries.
    assigned_object_id float
    Id of the terminating object (see assignedobjecttype).
    assigned_object_type str
    Content type of the terminating object. Derived from deviceinterfaceid, virtualmachineinterfaceid or vlanid when one of those is set; set it together with assignedobjectid otherwise. One assignment is required. One of: dcim.interface, virtualization.vminterface, ipam.vlan.
    created str
    custom_fields Mapping[str, str]
    Custom field values by field name. Every value is a string; NetBox coerces numbers and booleans. An object field holds the related object's id, e.g. "12", a multiobject field a JSON list of ids in any order, e.g. jsonencode([12, 13]). A key removed from the map is cleared in NetBox (set {} to clear all).
    device_interface_id float
    Id of the terminating device interface (assignedobjecttype dcim.interface). Conflicts with the other aliases and with setting the assigned*object** pair directly.
    id float
    NetBox id.
    l2vpn_id float
    Id of the L2VPN.
    last_updated str
    tags Sequence[str]
    Slugs of the tags assigned to the object (the provider's defaulttags are added on top, see tagsall).
    tags_alls Sequence[str]
    Slugs of all tags on the object, including the provider's default_tags.
    url str
    virtual_machine_interface_id float
    Id of the terminating virtual machine interface (assignedobjecttype virtualization.vminterface). Conflicts with the other aliases and with setting the assigned*object** pair directly.
    vlan_id float
    Id of the terminating VLAN (assignedobjecttype ipam.vlan). Conflicts with the other aliases and with setting the assigned*object** pair directly.
    custom_field_filters Mapping[str, str]
    Custom field values to match, by field name, e.g. { tier = "gold" }: each entry filters as cf_\n\n with the field's own filter logic, loose (case-insensitive substring) or exact.
    tag_slug str
    Slug of a tag the object carries.
    assignedObjectId Number
    Id of the terminating object (see assignedobjecttype).
    assignedObjectType String
    Content type of the terminating object. Derived from deviceinterfaceid, virtualmachineinterfaceid or vlanid when one of those is set; set it together with assignedobjectid otherwise. One assignment is required. One of: dcim.interface, virtualization.vminterface, ipam.vlan.
    created String
    customFields Map<String>
    Custom field values by field name. Every value is a string; NetBox coerces numbers and booleans. An object field holds the related object's id, e.g. "12", a multiobject field a JSON list of ids in any order, e.g. jsonencode([12, 13]). A key removed from the map is cleared in NetBox (set {} to clear all).
    deviceInterfaceId Number
    Id of the terminating device interface (assignedobjecttype dcim.interface). Conflicts with the other aliases and with setting the assigned*object** pair directly.
    id Number
    NetBox id.
    l2vpnId Number
    Id of the L2VPN.
    lastUpdated String
    tags List<String>
    Slugs of the tags assigned to the object (the provider's defaulttags are added on top, see tagsall).
    tagsAlls List<String>
    Slugs of all tags on the object, including the provider's default_tags.
    url String
    virtualMachineInterfaceId Number
    Id of the terminating virtual machine interface (assignedobjecttype virtualization.vminterface). Conflicts with the other aliases and with setting the assigned*object** pair directly.
    vlanId Number
    Id of the terminating VLAN (assignedobjecttype ipam.vlan). Conflicts with the other aliases and with setting the assigned*object** pair directly.
    customFieldFilters Map<String>
    Custom field values to match, by field name, e.g. { tier = "gold" }: each entry filters as cf_\n\n with the field's own filter logic, loose (case-insensitive substring) or exact.
    tagSlug String
    Slug of a tag the object carries.

    Package Details

    Repository
    netbox e-breuninger/terraform-provider-netbox
    License
    Notes
    This Pulumi package is based on the netbox Terraform Provider.
    netbox
    Viewing docs for netbox 6.0.0
    published on Wednesday, Nov 4, 2026 by e-breuninger

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial