1. Registry
  2. Packages
  3. Netbox Provider
  4. API Docs
  5. L2vpn
Viewing docs for netbox 6.0.1
published on Monday, Nov 16, 2026 by e-breuninger
netbox
Viewing docs for netbox 6.0.1
published on Monday, Nov 16, 2026 by e-breuninger

    A layer 2 VPN (vpn.l2vpn).

    From the official documentation:

    A L2VPN object is NetBox is a representation of a layer 2 bridge technology such as VXLAN, VPLS, or EPL. Each L2VPN can be identified by name as well as by an optional unique identifier (VNI would be an example). Once created, L2VPNs can be terminated to interfaces and VLANs.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as netbox from "@pulumi/netbox";
    
    const test = new netbox.Tenant("test", {name: "test-tenant"});
    const testRouteTarget = new netbox.RouteTarget("test", {name: "65000:100"});
    const testL2vpn = new netbox.L2vpn("test", {
        name: "test-l2vpn",
        slug: "test-l2vpn",
        type: "vxlan-evpn",
        identifier: 100,
        tenantId: test.tenantId,
        importTargetIds: [testRouteTarget.routeTargetId],
        exportTargetIds: [testRouteTarget.routeTargetId],
        description: "test-description",
    });
    
    import pulumi
    import pulumi_netbox as netbox
    
    test = netbox.Tenant("test", name="test-tenant")
    test_route_target = netbox.RouteTarget("test", name="65000:100")
    test_l2vpn = netbox.L2vpn("test",
        name="test-l2vpn",
        slug="test-l2vpn",
        type="vxlan-evpn",
        identifier=100,
        tenant_id=test.tenant_id,
        import_target_ids=[test_route_target.route_target_id],
        export_target_ids=[test_route_target.route_target_id],
        description="test-description")
    
    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 {
    		test, err := netbox.NewTenant(ctx, "test", &netbox.TenantArgs{
    			Name: pulumi.String("test-tenant"),
    		})
    		if err != nil {
    			return err
    		}
    		testRouteTarget, err := netbox.NewRouteTarget(ctx, "test", &netbox.RouteTargetArgs{
    			Name: pulumi.String("65000:100"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = netbox.NewL2vpn(ctx, "test", &netbox.L2vpnArgs{
    			Name:       pulumi.String("test-l2vpn"),
    			Slug:       pulumi.String("test-l2vpn"),
    			Type:       pulumi.String("vxlan-evpn"),
    			Identifier: pulumi.Float64(100),
    			TenantId:   test.TenantId,
    			ImportTargetIds: pulumi.Float64Array{
    				testRouteTarget.RouteTargetId,
    			},
    			ExportTargetIds: pulumi.Float64Array{
    				testRouteTarget.RouteTargetId,
    			},
    			Description: pulumi.String("test-description"),
    		})
    		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 = new Netbox.Tenant("test", new()
        {
            Name = "test-tenant",
        });
    
        var testRouteTarget = new Netbox.RouteTarget("test", new()
        {
            Name = "65000:100",
        });
    
        var testL2vpn = new Netbox.L2vpn("test", new()
        {
            Name = "test-l2vpn",
            Slug = "test-l2vpn",
            Type = "vxlan-evpn",
            Identifier = 100,
            TenantId = test.TenantId,
            ImportTargetIds = new[]
            {
                testRouteTarget.RouteTargetId,
            },
            ExportTargetIds = new[]
            {
                testRouteTarget.RouteTargetId,
            },
            Description = "test-description",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.netbox.Tenant;
    import com.pulumi.netbox.TenantArgs;
    import com.pulumi.netbox.RouteTarget;
    import com.pulumi.netbox.RouteTargetArgs;
    import com.pulumi.netbox.L2vpn;
    import com.pulumi.netbox.L2vpnArgs;
    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 test = new Tenant("test", TenantArgs.builder()
                .name("test-tenant")
                .build());
    
            var testRouteTarget = new RouteTarget("testRouteTarget", RouteTargetArgs.builder()
                .name("65000:100")
                .build());
    
            var testL2vpn = new L2vpn("testL2vpn", L2vpnArgs.builder()
                .name("test-l2vpn")
                .slug("test-l2vpn")
                .type("vxlan-evpn")
                .identifier(100.0)
                .tenantId(test.tenantId())
                .importTargetIds(testRouteTarget.routeTargetId())
                .exportTargetIds(testRouteTarget.routeTargetId())
                .description("test-description")
                .build());
    
        }
    }
    
    resources:
      test:
        type: netbox:Tenant
        properties:
          name: test-tenant
      testRouteTarget:
        type: netbox:RouteTarget
        name: test
        properties:
          name: 65000:100
      testL2vpn:
        type: netbox:L2vpn
        name: test
        properties:
          name: test-l2vpn
          slug: test-l2vpn
          type: vxlan-evpn
          identifier: 100
          tenantId: ${test.tenantId}
          importTargetIds:
            - ${testRouteTarget.routeTargetId}
          exportTargetIds:
            - ${testRouteTarget.routeTargetId}
          description: test-description
    
    Example coming soon!
    

    Create L2vpn Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new L2vpn(name: string, args: L2vpnArgs, opts?: CustomResourceOptions);
    @overload
    def L2vpn(resource_name: str,
              args: L2vpnArgs,
              opts: Optional[ResourceOptions] = None)
    
    @overload
    def L2vpn(resource_name: str,
              opts: Optional[ResourceOptions] = None,
              type: Optional[str] = None,
              name: Optional[str] = None,
              description: Optional[str] = None,
              export_target_ids: Optional[Sequence[float]] = None,
              identifier: Optional[float] = None,
              import_target_ids: Optional[Sequence[float]] = None,
              comments: Optional[str] = None,
              owner_id: Optional[float] = None,
              slug: Optional[str] = None,
              status: Optional[str] = None,
              tags: Optional[Sequence[str]] = None,
              tenant_id: Optional[float] = None,
              custom_fields: Optional[Mapping[str, str]] = None)
    func NewL2vpn(ctx *Context, name string, args L2vpnArgs, opts ...ResourceOption) (*L2vpn, error)
    public L2vpn(string name, L2vpnArgs args, CustomResourceOptions? opts = null)
    public L2vpn(String name, L2vpnArgs args)
    public L2vpn(String name, L2vpnArgs args, CustomResourceOptions options)
    
    type: netbox:L2vpn
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    resource "netbox_l2vpn" "name" {
        # resource properties
    }

    Parameters

    name string
    The unique name of the resource.
    args L2vpnArgs
    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 L2vpnArgs
    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 L2vpnArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args L2vpnArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args L2vpnArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var l2vpnResource = new Netbox.L2vpn("l2vpnResource", new()
    {
        Type = "string",
        Name = "string",
        Description = "string",
        ExportTargetIds = new[]
        {
            0.0,
        },
        Identifier = 0.0,
        ImportTargetIds = new[]
        {
            0.0,
        },
        Comments = "string",
        OwnerId = 0.0,
        Slug = "string",
        Status = "string",
        Tags = new[]
        {
            "string",
        },
        TenantId = 0.0,
        CustomFields = 
        {
            { "string", "string" },
        },
    });
    
    example, err := netbox.NewL2vpn(ctx, "l2vpnResource", &netbox.L2vpnArgs{
    	Type:        pulumi.String("string"),
    	Name:        pulumi.String("string"),
    	Description: pulumi.String("string"),
    	ExportTargetIds: pulumi.Float64Array{
    		pulumi.Float64(0),
    	},
    	Identifier: pulumi.Float64(0),
    	ImportTargetIds: pulumi.Float64Array{
    		pulumi.Float64(0),
    	},
    	Comments: pulumi.String("string"),
    	OwnerId:  pulumi.Float64(0),
    	Slug:     pulumi.String("string"),
    	Status:   pulumi.String("string"),
    	Tags: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	TenantId: pulumi.Float64(0),
    	CustomFields: pulumi.StringMap{
    		"string": pulumi.String("string"),
    	},
    })
    
    resource "netbox_l2vpn" "l2vpnResource" {
      lifecycle {
        create_before_destroy = true
      }
      type              = "string"
      name              = "string"
      description       = "string"
      export_target_ids = [0]
      identifier        = 0
      import_target_ids = [0]
      comments          = "string"
      owner_id          = 0
      slug              = "string"
      status            = "string"
      tags              = ["string"]
      tenant_id         = 0
      custom_fields = {
        "string" = "string"
      }
    }
    
    var l2vpnResource = new L2vpn("l2vpnResource", L2vpnArgs.builder()
        .type("string")
        .name("string")
        .description("string")
        .exportTargetIds(0.0)
        .identifier(0.0)
        .importTargetIds(0.0)
        .comments("string")
        .ownerId(0.0)
        .slug("string")
        .status("string")
        .tags("string")
        .tenantId(0.0)
        .customFields(Map.of("string", "string"))
        .build());
    
    l2vpn_resource = netbox.L2vpn("l2vpnResource",
        type="string",
        name="string",
        description="string",
        export_target_ids=[float(0)],
        identifier=float(0),
        import_target_ids=[float(0)],
        comments="string",
        owner_id=float(0),
        slug="string",
        status="string",
        tags=["string"],
        tenant_id=float(0),
        custom_fields={
            "string": "string",
        })
    
    const l2vpnResource = new netbox.L2vpn("l2vpnResource", {
        type: "string",
        name: "string",
        description: "string",
        exportTargetIds: [0],
        identifier: 0,
        importTargetIds: [0],
        comments: "string",
        ownerId: 0,
        slug: "string",
        status: "string",
        tags: ["string"],
        tenantId: 0,
        customFields: {
            string: "string",
        },
    });
    
    type: netbox:L2vpn
    properties:
        comments: string
        customFields:
            string: string
        description: string
        exportTargetIds:
            - 0
        identifier: 0
        importTargetIds:
            - 0
        name: string
        ownerId: 0
        slug: string
        status: string
        tags:
            - string
        tenantId: 0
        type: string
    

    L2vpn Resource Properties

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

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The L2vpn resource accepts the following input properties:

    Type string
    L2VPN technology. One of: vpws, vpls, vxlan, vxlan-evpn, mpls-evpn, pbb-evpn, epl, evpl, ep-lan, evp-lan, ep-tree, evp-tree, evpn-vpws, spb.
    Comments 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).
    Description string
    ExportTargetIds List<double>
    Ids of exported route targets.
    Identifier double
    Numeric identifier (e.g. the VNI or VPLS id), not the NetBox id. Must be a whole number.
    ImportTargetIds List<double>
    Ids of imported route targets.
    Name string
    OwnerId double
    Id of the owner the object is assigned to.
    Slug string
    URL-friendly unique shorthand; derived from name when not set.
    Status string
    Operational status. One of: active, planned, decommissioning.
    Tags List<string>
    Slugs of the tags assigned to the object (the provider's defaulttags are added on top, see tagsall).
    TenantId double
    Id of the tenant.
    Type string
    L2VPN technology. One of: vpws, vpls, vxlan, vxlan-evpn, mpls-evpn, pbb-evpn, epl, evpl, ep-lan, evp-lan, ep-tree, evp-tree, evpn-vpws, spb.
    Comments 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).
    Description string
    ExportTargetIds []float64
    Ids of exported route targets.
    Identifier float64
    Numeric identifier (e.g. the VNI or VPLS id), not the NetBox id. Must be a whole number.
    ImportTargetIds []float64
    Ids of imported route targets.
    Name string
    OwnerId float64
    Id of the owner the object is assigned to.
    Slug string
    URL-friendly unique shorthand; derived from name when not set.
    Status string
    Operational status. One of: active, planned, decommissioning.
    Tags []string
    Slugs of the tags assigned to the object (the provider's defaulttags are added on top, see tagsall).
    TenantId float64
    Id of the tenant.
    type string
    L2VPN technology. One of: vpws, vpls, vxlan, vxlan-evpn, mpls-evpn, pbb-evpn, epl, evpl, ep-lan, evp-lan, ep-tree, evp-tree, evpn-vpws, spb.
    comments 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).
    description string
    export_target_ids list(number)
    Ids of exported route targets.
    identifier number
    Numeric identifier (e.g. the VNI or VPLS id), not the NetBox id. Must be a whole number.
    import_target_ids list(number)
    Ids of imported route targets.
    name string
    owner_id number
    Id of the owner the object is assigned to.
    slug string
    URL-friendly unique shorthand; derived from name when not set.
    status string
    Operational status. One of: active, planned, decommissioning.
    tags list(string)
    Slugs of the tags assigned to the object (the provider's defaulttags are added on top, see tagsall).
    tenant_id number
    Id of the tenant.
    type String
    L2VPN technology. One of: vpws, vpls, vxlan, vxlan-evpn, mpls-evpn, pbb-evpn, epl, evpl, ep-lan, evp-lan, ep-tree, evp-tree, evpn-vpws, spb.
    comments 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).
    description String
    exportTargetIds List<Double>
    Ids of exported route targets.
    identifier Double
    Numeric identifier (e.g. the VNI or VPLS id), not the NetBox id. Must be a whole number.
    importTargetIds List<Double>
    Ids of imported route targets.
    name String
    ownerId Double
    Id of the owner the object is assigned to.
    slug String
    URL-friendly unique shorthand; derived from name when not set.
    status String
    Operational status. One of: active, planned, decommissioning.
    tags List<String>
    Slugs of the tags assigned to the object (the provider's defaulttags are added on top, see tagsall).
    tenantId Double
    Id of the tenant.
    type string
    L2VPN technology. One of: vpws, vpls, vxlan, vxlan-evpn, mpls-evpn, pbb-evpn, epl, evpl, ep-lan, evp-lan, ep-tree, evp-tree, evpn-vpws, spb.
    comments 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).
    description string
    exportTargetIds number[]
    Ids of exported route targets.
    identifier number
    Numeric identifier (e.g. the VNI or VPLS id), not the NetBox id. Must be a whole number.
    importTargetIds number[]
    Ids of imported route targets.
    name string
    ownerId number
    Id of the owner the object is assigned to.
    slug string
    URL-friendly unique shorthand; derived from name when not set.
    status string
    Operational status. One of: active, planned, decommissioning.
    tags string[]
    Slugs of the tags assigned to the object (the provider's defaulttags are added on top, see tagsall).
    tenantId number
    Id of the tenant.
    type str
    L2VPN technology. One of: vpws, vpls, vxlan, vxlan-evpn, mpls-evpn, pbb-evpn, epl, evpl, ep-lan, evp-lan, ep-tree, evp-tree, evpn-vpws, spb.
    comments 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).
    description str
    export_target_ids Sequence[float]
    Ids of exported route targets.
    identifier float
    Numeric identifier (e.g. the VNI or VPLS id), not the NetBox id. Must be a whole number.
    import_target_ids Sequence[float]
    Ids of imported route targets.
    name str
    owner_id float
    Id of the owner the object is assigned to.
    slug str
    URL-friendly unique shorthand; derived from name when not set.
    status str
    Operational status. One of: active, planned, decommissioning.
    tags Sequence[str]
    Slugs of the tags assigned to the object (the provider's defaulttags are added on top, see tagsall).
    tenant_id float
    Id of the tenant.
    type String
    L2VPN technology. One of: vpws, vpls, vxlan, vxlan-evpn, mpls-evpn, pbb-evpn, epl, evpl, ep-lan, evp-lan, ep-tree, evp-tree, evpn-vpws, spb.
    comments 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).
    description String
    exportTargetIds List<Number>
    Ids of exported route targets.
    identifier Number
    Numeric identifier (e.g. the VNI or VPLS id), not the NetBox id. Must be a whole number.
    importTargetIds List<Number>
    Ids of imported route targets.
    name String
    ownerId Number
    Id of the owner the object is assigned to.
    slug String
    URL-friendly unique shorthand; derived from name when not set.
    status String
    Operational status. One of: active, planned, decommissioning.
    tags List<String>
    Slugs of the tags assigned to the object (the provider's defaulttags are added on top, see tagsall).
    tenantId Number
    Id of the tenant.

    Outputs

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

    Created string
    Id string
    The provider-assigned unique ID for this managed resource.
    L2vpnId double
    NetBox id.
    LastUpdated string
    TagsAlls List<string>
    Slugs of all tags on the object, including the provider's default_tags.
    Url string
    Created string
    Id string
    The provider-assigned unique ID for this managed resource.
    L2vpnId float64
    NetBox id.
    LastUpdated string
    TagsAlls []string
    Slugs of all tags on the object, including the provider's default_tags.
    Url string
    created string
    id string
    The provider-assigned unique ID for this managed resource.
    l2vpn_id number
    NetBox id.
    last_updated string
    tags_alls list(string)
    Slugs of all tags on the object, including the provider's default_tags.
    url string
    created String
    id String
    The provider-assigned unique ID for this managed resource.
    l2vpnId Double
    NetBox id.
    lastUpdated String
    tagsAlls List<String>
    Slugs of all tags on the object, including the provider's default_tags.
    url String
    created string
    id string
    The provider-assigned unique ID for this managed resource.
    l2vpnId number
    NetBox id.
    lastUpdated string
    tagsAlls string[]
    Slugs of all tags on the object, including the provider's default_tags.
    url string
    created str
    id str
    The provider-assigned unique ID for this managed resource.
    l2vpn_id float
    NetBox id.
    last_updated str
    tags_alls Sequence[str]
    Slugs of all tags on the object, including the provider's default_tags.
    url str
    created String
    id String
    The provider-assigned unique ID for this managed resource.
    l2vpnId Number
    NetBox id.
    lastUpdated String
    tagsAlls List<String>
    Slugs of all tags on the object, including the provider's default_tags.
    url String

    Look up Existing L2vpn Resource

    Get an existing L2vpn 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?: L2vpnState, opts?: CustomResourceOptions): L2vpn
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            comments: Optional[str] = None,
            created: Optional[str] = None,
            custom_fields: Optional[Mapping[str, str]] = None,
            description: Optional[str] = None,
            export_target_ids: Optional[Sequence[float]] = None,
            identifier: Optional[float] = None,
            import_target_ids: Optional[Sequence[float]] = None,
            l2vpn_id: Optional[float] = None,
            last_updated: Optional[str] = None,
            name: Optional[str] = None,
            owner_id: Optional[float] = None,
            slug: Optional[str] = None,
            status: Optional[str] = None,
            tags: Optional[Sequence[str]] = None,
            tags_alls: Optional[Sequence[str]] = None,
            tenant_id: Optional[float] = None,
            type: Optional[str] = None,
            url: Optional[str] = None) -> L2vpn
    func GetL2vpn(ctx *Context, name string, id IDInput, state *L2vpnState, opts ...ResourceOption) (*L2vpn, error)
    public static L2vpn Get(string name, Input<string> id, L2vpnState? state, CustomResourceOptions? opts = null)
    public static L2vpn get(String name, Output<String> id, L2vpnState state, CustomResourceOptions options)
    resources:  existingL2vpn:    type: netbox:L2vpn    get:      id: ${id}
    import {
      to = netbox_l2vpn.example
      id = "${id}"
    }
    
    name string
    The unique name of the resulting resource.
    id Input<ID>
    The unique provider ID of the resource to look up.
    state L2vpnState
    Known property values the provider needs, along with the ID, to find the resource. Usually not required.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resulting resource.
    id str
    The unique provider ID of the resource to look up.
    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 resulting resource.
    id IDInput
    The unique provider ID of the resource to look up.
    state L2vpnState
    Known property values the provider needs, along with the ID, to find the resource. Usually not required.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resulting resource.
    id Input<string>
    The unique provider ID of the resource to look up.
    state L2vpnState
    Known property values the provider needs, along with the ID, to find the resource. Usually not required.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resulting resource.
    id Output<String>
    The unique provider ID of the resource to look up.
    state L2vpnState
    Known property values the provider needs, along with the ID, to find the resource. Usually not required.
    options CustomResourceOptions
    Bag of options to control resource's behavior.
    The following state arguments are supported:
    Comments string
    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).
    Description string
    ExportTargetIds List<double>
    Ids of exported route targets.
    Identifier double
    Numeric identifier (e.g. the VNI or VPLS id), not the NetBox id. Must be a whole number.
    ImportTargetIds List<double>
    Ids of imported route targets.
    L2vpnId double
    NetBox id.
    LastUpdated string
    Name string
    OwnerId double
    Id of the owner the object is assigned to.
    Slug string
    URL-friendly unique shorthand; derived from name when not set.
    Status string
    Operational status. One of: active, planned, decommissioning.
    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.
    TenantId double
    Id of the tenant.
    Type string
    L2VPN technology. One of: vpws, vpls, vxlan, vxlan-evpn, mpls-evpn, pbb-evpn, epl, evpl, ep-lan, evp-lan, ep-tree, evp-tree, evpn-vpws, spb.
    Url string
    Comments string
    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).
    Description string
    ExportTargetIds []float64
    Ids of exported route targets.
    Identifier float64
    Numeric identifier (e.g. the VNI or VPLS id), not the NetBox id. Must be a whole number.
    ImportTargetIds []float64
    Ids of imported route targets.
    L2vpnId float64
    NetBox id.
    LastUpdated string
    Name string
    OwnerId float64
    Id of the owner the object is assigned to.
    Slug string
    URL-friendly unique shorthand; derived from name when not set.
    Status string
    Operational status. One of: active, planned, decommissioning.
    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.
    TenantId float64
    Id of the tenant.
    Type string
    L2VPN technology. One of: vpws, vpls, vxlan, vxlan-evpn, mpls-evpn, pbb-evpn, epl, evpl, ep-lan, evp-lan, ep-tree, evp-tree, evpn-vpws, spb.
    Url string
    comments string
    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).
    description string
    export_target_ids list(number)
    Ids of exported route targets.
    identifier number
    Numeric identifier (e.g. the VNI or VPLS id), not the NetBox id. Must be a whole number.
    import_target_ids list(number)
    Ids of imported route targets.
    l2vpn_id number
    NetBox id.
    last_updated string
    name string
    owner_id number
    Id of the owner the object is assigned to.
    slug string
    URL-friendly unique shorthand; derived from name when not set.
    status string
    Operational status. One of: active, planned, decommissioning.
    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.
    tenant_id number
    Id of the tenant.
    type string
    L2VPN technology. One of: vpws, vpls, vxlan, vxlan-evpn, mpls-evpn, pbb-evpn, epl, evpl, ep-lan, evp-lan, ep-tree, evp-tree, evpn-vpws, spb.
    url string
    comments String
    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).
    description String
    exportTargetIds List<Double>
    Ids of exported route targets.
    identifier Double
    Numeric identifier (e.g. the VNI or VPLS id), not the NetBox id. Must be a whole number.
    importTargetIds List<Double>
    Ids of imported route targets.
    l2vpnId Double
    NetBox id.
    lastUpdated String
    name String
    ownerId Double
    Id of the owner the object is assigned to.
    slug String
    URL-friendly unique shorthand; derived from name when not set.
    status String
    Operational status. One of: active, planned, decommissioning.
    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.
    tenantId Double
    Id of the tenant.
    type String
    L2VPN technology. One of: vpws, vpls, vxlan, vxlan-evpn, mpls-evpn, pbb-evpn, epl, evpl, ep-lan, evp-lan, ep-tree, evp-tree, evpn-vpws, spb.
    url String
    comments string
    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).
    description string
    exportTargetIds number[]
    Ids of exported route targets.
    identifier number
    Numeric identifier (e.g. the VNI or VPLS id), not the NetBox id. Must be a whole number.
    importTargetIds number[]
    Ids of imported route targets.
    l2vpnId number
    NetBox id.
    lastUpdated string
    name string
    ownerId number
    Id of the owner the object is assigned to.
    slug string
    URL-friendly unique shorthand; derived from name when not set.
    status string
    Operational status. One of: active, planned, decommissioning.
    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.
    tenantId number
    Id of the tenant.
    type string
    L2VPN technology. One of: vpws, vpls, vxlan, vxlan-evpn, mpls-evpn, pbb-evpn, epl, evpl, ep-lan, evp-lan, ep-tree, evp-tree, evpn-vpws, spb.
    url string
    comments str
    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).
    description str
    export_target_ids Sequence[float]
    Ids of exported route targets.
    identifier float
    Numeric identifier (e.g. the VNI or VPLS id), not the NetBox id. Must be a whole number.
    import_target_ids Sequence[float]
    Ids of imported route targets.
    l2vpn_id float
    NetBox id.
    last_updated str
    name str
    owner_id float
    Id of the owner the object is assigned to.
    slug str
    URL-friendly unique shorthand; derived from name when not set.
    status str
    Operational status. One of: active, planned, decommissioning.
    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.
    tenant_id float
    Id of the tenant.
    type str
    L2VPN technology. One of: vpws, vpls, vxlan, vxlan-evpn, mpls-evpn, pbb-evpn, epl, evpl, ep-lan, evp-lan, ep-tree, evp-tree, evpn-vpws, spb.
    url str
    comments String
    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).
    description String
    exportTargetIds List<Number>
    Ids of exported route targets.
    identifier Number
    Numeric identifier (e.g. the VNI or VPLS id), not the NetBox id. Must be a whole number.
    importTargetIds List<Number>
    Ids of imported route targets.
    l2vpnId Number
    NetBox id.
    lastUpdated String
    name String
    ownerId Number
    Id of the owner the object is assigned to.
    slug String
    URL-friendly unique shorthand; derived from name when not set.
    status String
    Operational status. One of: active, planned, decommissioning.
    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.
    tenantId Number
    Id of the tenant.
    type String
    L2VPN technology. One of: vpws, vpls, vxlan, vxlan-evpn, mpls-evpn, pbb-evpn, epl, evpl, ep-lan, evp-lan, ep-tree, evp-tree, evpn-vpws, spb.
    url String

    Import

    In Terraform v1.5.0 and later, the import block can be used with the id attribute, for example:

    terraform

    import {

    to = netbox_l2vpn.test

    id = “123”

    }

    The pulumi import command can be used, for example:

    $ pulumi import netbox:index/l2vpn:L2vpn test 123
    

    To learn more about importing existing cloud resources, see Importing resources.

    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.1
    published on Monday, Nov 16, 2026 by e-breuninger

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial