1. Registry
  2. Packages
  3. Netbox Provider
  4. API Docs
  5. VpnTunnel
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

    An encrypted or virtual tunnel (vpn.tunnel).

    From the official documentation:

    NetBox can model private tunnels formed among virtual termination points across your network. Typical tunnel implementations include GRE, IP-in-IP, and IPSec. A tunnel may be terminated to two or more device or virtual machine interfaces. For convenient organization, tunnels may be assigned to user-defined groups.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as netbox from "@pulumi/netbox";
    
    const test = new netbox.VpnTunnelGroup("test", {name: "test-vpn-tunnel-group"});
    const testTenant = new netbox.Tenant("test", {name: "test-tenant"});
    const testVpnTunnel = new netbox.VpnTunnel("test", {
        name: "test-vpn-tunnel",
        encapsulation: "gre",
        status: "active",
        vpnTunnelGroupId: test.vpnTunnelGroupId,
        tenantId: testTenant.tenantId,
        tunnelId: 42,
        description: "test-description",
    });
    
    import pulumi
    import pulumi_netbox as netbox
    
    test = netbox.VpnTunnelGroup("test", name="test-vpn-tunnel-group")
    test_tenant = netbox.Tenant("test", name="test-tenant")
    test_vpn_tunnel = netbox.VpnTunnel("test",
        name="test-vpn-tunnel",
        encapsulation="gre",
        status="active",
        vpn_tunnel_group_id=test.vpn_tunnel_group_id,
        tenant_id=test_tenant.tenant_id,
        tunnel_id=42,
        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.NewVpnTunnelGroup(ctx, "test", &netbox.VpnTunnelGroupArgs{
    			Name: pulumi.String("test-vpn-tunnel-group"),
    		})
    		if err != nil {
    			return err
    		}
    		testTenant, err := netbox.NewTenant(ctx, "test", &netbox.TenantArgs{
    			Name: pulumi.String("test-tenant"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = netbox.NewVpnTunnel(ctx, "test", &netbox.VpnTunnelArgs{
    			Name:             pulumi.String("test-vpn-tunnel"),
    			Encapsulation:    pulumi.String("gre"),
    			Status:           pulumi.String("active"),
    			VpnTunnelGroupId: test.VpnTunnelGroupId,
    			TenantId:         testTenant.TenantId,
    			TunnelId:         pulumi.Float64(42),
    			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.VpnTunnelGroup("test", new()
        {
            Name = "test-vpn-tunnel-group",
        });
    
        var testTenant = new Netbox.Tenant("test", new()
        {
            Name = "test-tenant",
        });
    
        var testVpnTunnel = new Netbox.VpnTunnel("test", new()
        {
            Name = "test-vpn-tunnel",
            Encapsulation = "gre",
            Status = "active",
            VpnTunnelGroupId = test.VpnTunnelGroupId,
            TenantId = testTenant.TenantId,
            TunnelId = 42,
            Description = "test-description",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.netbox.VpnTunnelGroup;
    import com.pulumi.netbox.VpnTunnelGroupArgs;
    import com.pulumi.netbox.Tenant;
    import com.pulumi.netbox.TenantArgs;
    import com.pulumi.netbox.VpnTunnel;
    import com.pulumi.netbox.VpnTunnelArgs;
    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 VpnTunnelGroup("test", VpnTunnelGroupArgs.builder()
                .name("test-vpn-tunnel-group")
                .build());
    
            var testTenant = new Tenant("testTenant", TenantArgs.builder()
                .name("test-tenant")
                .build());
    
            var testVpnTunnel = new VpnTunnel("testVpnTunnel", VpnTunnelArgs.builder()
                .name("test-vpn-tunnel")
                .encapsulation("gre")
                .status("active")
                .vpnTunnelGroupId(test.vpnTunnelGroupId())
                .tenantId(testTenant.tenantId())
                .tunnelId(42.0)
                .description("test-description")
                .build());
    
        }
    }
    
    resources:
      test:
        type: netbox:VpnTunnelGroup
        properties:
          name: test-vpn-tunnel-group
      testTenant:
        type: netbox:Tenant
        name: test
        properties:
          name: test-tenant
      testVpnTunnel:
        type: netbox:VpnTunnel
        name: test
        properties:
          name: test-vpn-tunnel
          encapsulation: gre
          status: active
          vpnTunnelGroupId: ${test.vpnTunnelGroupId}
          tenantId: ${testTenant.tenantId}
          tunnelId: 42
          description: test-description
    
    Example coming soon!
    

    Create VpnTunnel Resource

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

    Constructor syntax

    new VpnTunnel(name: string, args: VpnTunnelArgs, opts?: CustomResourceOptions);
    @overload
    def VpnTunnel(resource_name: str,
                  args: VpnTunnelArgs,
                  opts: Optional[ResourceOptions] = None)
    
    @overload
    def VpnTunnel(resource_name: str,
                  opts: Optional[ResourceOptions] = None,
                  encapsulation: Optional[str] = None,
                  owner_id: Optional[float] = None,
                  description: Optional[str] = None,
                  custom_fields: Optional[Mapping[str, str]] = None,
                  ipsec_profile_id: Optional[float] = None,
                  name: Optional[str] = None,
                  comments: Optional[str] = None,
                  status: Optional[str] = None,
                  tags: Optional[Sequence[str]] = None,
                  tenant_id: Optional[float] = None,
                  tunnel_group_id: Optional[float] = None,
                  tunnel_id: Optional[float] = None,
                  vpn_tunnel_group_id: Optional[float] = None)
    func NewVpnTunnel(ctx *Context, name string, args VpnTunnelArgs, opts ...ResourceOption) (*VpnTunnel, error)
    public VpnTunnel(string name, VpnTunnelArgs args, CustomResourceOptions? opts = null)
    public VpnTunnel(String name, VpnTunnelArgs args)
    public VpnTunnel(String name, VpnTunnelArgs args, CustomResourceOptions options)
    
    type: netbox:VpnTunnel
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    resource "netbox_vpn_tunnel" "name" {
        # resource properties
    }

    Parameters

    name string
    The unique name of the resource.
    args VpnTunnelArgs
    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 VpnTunnelArgs
    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 VpnTunnelArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args VpnTunnelArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args VpnTunnelArgs
    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 vpnTunnelResource = new Netbox.VpnTunnel("vpnTunnelResource", new()
    {
        Encapsulation = "string",
        OwnerId = 0.0,
        Description = "string",
        CustomFields = 
        {
            { "string", "string" },
        },
        IpsecProfileId = 0.0,
        Name = "string",
        Comments = "string",
        Status = "string",
        Tags = new[]
        {
            "string",
        },
        TenantId = 0.0,
        TunnelId = 0.0,
        VpnTunnelGroupId = 0.0,
    });
    
    example, err := netbox.NewVpnTunnel(ctx, "vpnTunnelResource", &netbox.VpnTunnelArgs{
    	Encapsulation: pulumi.String("string"),
    	OwnerId:       pulumi.Float64(0),
    	Description:   pulumi.String("string"),
    	CustomFields: pulumi.StringMap{
    		"string": pulumi.String("string"),
    	},
    	IpsecProfileId: pulumi.Float64(0),
    	Name:           pulumi.String("string"),
    	Comments:       pulumi.String("string"),
    	Status:         pulumi.String("string"),
    	Tags: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	TenantId:         pulumi.Float64(0),
    	TunnelId:         pulumi.Float64(0),
    	VpnTunnelGroupId: pulumi.Float64(0),
    })
    
    resource "netbox_vpn_tunnel" "vpnTunnelResource" {
      lifecycle {
        create_before_destroy = true
      }
      encapsulation = "string"
      owner_id      = 0
      description   = "string"
      custom_fields = {
        "string" = "string"
      }
      ipsec_profile_id    = 0
      name                = "string"
      comments            = "string"
      status              = "string"
      tags                = ["string"]
      tenant_id           = 0
      tunnel_id           = 0
      vpn_tunnel_group_id = 0
    }
    
    var vpnTunnelResource = new VpnTunnel("vpnTunnelResource", VpnTunnelArgs.builder()
        .encapsulation("string")
        .ownerId(0.0)
        .description("string")
        .customFields(Map.of("string", "string"))
        .ipsecProfileId(0.0)
        .name("string")
        .comments("string")
        .status("string")
        .tags("string")
        .tenantId(0.0)
        .tunnelId(0.0)
        .vpnTunnelGroupId(0.0)
        .build());
    
    vpn_tunnel_resource = netbox.VpnTunnel("vpnTunnelResource",
        encapsulation="string",
        owner_id=float(0),
        description="string",
        custom_fields={
            "string": "string",
        },
        ipsec_profile_id=float(0),
        name="string",
        comments="string",
        status="string",
        tags=["string"],
        tenant_id=float(0),
        tunnel_id=float(0),
        vpn_tunnel_group_id=float(0))
    
    const vpnTunnelResource = new netbox.VpnTunnel("vpnTunnelResource", {
        encapsulation: "string",
        ownerId: 0,
        description: "string",
        customFields: {
            string: "string",
        },
        ipsecProfileId: 0,
        name: "string",
        comments: "string",
        status: "string",
        tags: ["string"],
        tenantId: 0,
        tunnelId: 0,
        vpnTunnelGroupId: 0,
    });
    
    type: netbox:VpnTunnel
    properties:
        comments: string
        customFields:
            string: string
        description: string
        encapsulation: string
        ipsecProfileId: 0
        name: string
        ownerId: 0
        status: string
        tags:
            - string
        tenantId: 0
        tunnelId: 0
        vpnTunnelGroupId: 0
    

    VpnTunnel 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 VpnTunnel resource accepts the following input properties:

    Encapsulation string
    Tunnel encapsulation protocol. One of: ipsec-transport, ipsec-tunnel, ip-ip, gre, wireguard, openvpn, l2tp, pptp.
    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
    IpsecProfileId double
    Id of the IPsec profile.
    Name string
    OwnerId double
    Id of the owner the object is assigned to.
    Status string
    Operational status. One of: planned, active, disabled.
    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.
    TunnelGroupId double
    Deprecated alias of vpntunnelgroup_id.

    Deprecated: Deprecated

    TunnelId double
    Numeric tunnel identifier on the wire (e.g. a GRE key), not the NetBox id.
    VpnTunnelGroupId double
    Id of the tunnel group.
    Encapsulation string
    Tunnel encapsulation protocol. One of: ipsec-transport, ipsec-tunnel, ip-ip, gre, wireguard, openvpn, l2tp, pptp.
    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
    IpsecProfileId float64
    Id of the IPsec profile.
    Name string
    OwnerId float64
    Id of the owner the object is assigned to.
    Status string
    Operational status. One of: planned, active, disabled.
    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.
    TunnelGroupId float64
    Deprecated alias of vpntunnelgroup_id.

    Deprecated: Deprecated

    TunnelId float64
    Numeric tunnel identifier on the wire (e.g. a GRE key), not the NetBox id.
    VpnTunnelGroupId float64
    Id of the tunnel group.
    encapsulation string
    Tunnel encapsulation protocol. One of: ipsec-transport, ipsec-tunnel, ip-ip, gre, wireguard, openvpn, l2tp, pptp.
    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
    ipsec_profile_id number
    Id of the IPsec profile.
    name string
    owner_id number
    Id of the owner the object is assigned to.
    status string
    Operational status. One of: planned, active, disabled.
    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.
    tunnel_group_id number
    Deprecated alias of vpntunnelgroup_id.

    Deprecated: Deprecated

    tunnel_id number
    Numeric tunnel identifier on the wire (e.g. a GRE key), not the NetBox id.
    vpn_tunnel_group_id number
    Id of the tunnel group.
    encapsulation String
    Tunnel encapsulation protocol. One of: ipsec-transport, ipsec-tunnel, ip-ip, gre, wireguard, openvpn, l2tp, pptp.
    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
    ipsecProfileId Double
    Id of the IPsec profile.
    name String
    ownerId Double
    Id of the owner the object is assigned to.
    status String
    Operational status. One of: planned, active, disabled.
    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.
    tunnelGroupId Double
    Deprecated alias of vpntunnelgroup_id.

    Deprecated: Deprecated

    tunnelId Double
    Numeric tunnel identifier on the wire (e.g. a GRE key), not the NetBox id.
    vpnTunnelGroupId Double
    Id of the tunnel group.
    encapsulation string
    Tunnel encapsulation protocol. One of: ipsec-transport, ipsec-tunnel, ip-ip, gre, wireguard, openvpn, l2tp, pptp.
    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
    ipsecProfileId number
    Id of the IPsec profile.
    name string
    ownerId number
    Id of the owner the object is assigned to.
    status string
    Operational status. One of: planned, active, disabled.
    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.
    tunnelGroupId number
    Deprecated alias of vpntunnelgroup_id.

    Deprecated: Deprecated

    tunnelId number
    Numeric tunnel identifier on the wire (e.g. a GRE key), not the NetBox id.
    vpnTunnelGroupId number
    Id of the tunnel group.
    encapsulation str
    Tunnel encapsulation protocol. One of: ipsec-transport, ipsec-tunnel, ip-ip, gre, wireguard, openvpn, l2tp, pptp.
    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
    ipsec_profile_id float
    Id of the IPsec profile.
    name str
    owner_id float
    Id of the owner the object is assigned to.
    status str
    Operational status. One of: planned, active, disabled.
    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.
    tunnel_group_id float
    Deprecated alias of vpntunnelgroup_id.

    Deprecated: Deprecated

    tunnel_id float
    Numeric tunnel identifier on the wire (e.g. a GRE key), not the NetBox id.
    vpn_tunnel_group_id float
    Id of the tunnel group.
    encapsulation String
    Tunnel encapsulation protocol. One of: ipsec-transport, ipsec-tunnel, ip-ip, gre, wireguard, openvpn, l2tp, pptp.
    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
    ipsecProfileId Number
    Id of the IPsec profile.
    name String
    ownerId Number
    Id of the owner the object is assigned to.
    status String
    Operational status. One of: planned, active, disabled.
    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.
    tunnelGroupId Number
    Deprecated alias of vpntunnelgroup_id.

    Deprecated: Deprecated

    tunnelId Number
    Numeric tunnel identifier on the wire (e.g. a GRE key), not the NetBox id.
    vpnTunnelGroupId Number
    Id of the tunnel group.

    Outputs

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

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

    Look up Existing VpnTunnel Resource

    Get an existing VpnTunnel 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?: VpnTunnelState, opts?: CustomResourceOptions): VpnTunnel
    @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,
            encapsulation: Optional[str] = None,
            ipsec_profile_id: Optional[float] = None,
            last_updated: Optional[str] = None,
            name: Optional[str] = None,
            owner_id: Optional[float] = None,
            status: Optional[str] = None,
            tags: Optional[Sequence[str]] = None,
            tags_alls: Optional[Sequence[str]] = None,
            tenant_id: Optional[float] = None,
            termination_count: Optional[float] = None,
            tunnel_group_id: Optional[float] = None,
            tunnel_id: Optional[float] = None,
            url: Optional[str] = None,
            vpn_tunnel_group_id: Optional[float] = None,
            vpn_tunnel_id: Optional[float] = None) -> VpnTunnel
    func GetVpnTunnel(ctx *Context, name string, id IDInput, state *VpnTunnelState, opts ...ResourceOption) (*VpnTunnel, error)
    public static VpnTunnel Get(string name, Input<string> id, VpnTunnelState? state, CustomResourceOptions? opts = null)
    public static VpnTunnel get(String name, Output<String> id, VpnTunnelState state, CustomResourceOptions options)
    resources:  existingVpnTunnel:    type: netbox:VpnTunnel    get:      id: ${id}
    import {
      to = netbox_vpn_tunnel.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 VpnTunnelState
    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 VpnTunnelState
    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 VpnTunnelState
    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 VpnTunnelState
    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
    Encapsulation string
    Tunnel encapsulation protocol. One of: ipsec-transport, ipsec-tunnel, ip-ip, gre, wireguard, openvpn, l2tp, pptp.
    IpsecProfileId double
    Id of the IPsec profile.
    LastUpdated string
    Name string
    OwnerId double
    Id of the owner the object is assigned to.
    Status string
    Operational status. One of: planned, active, disabled.
    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.
    TerminationCount double
    Number of terminations of the tunnel.
    TunnelGroupId double
    Deprecated alias of vpntunnelgroup_id.

    Deprecated: Deprecated

    TunnelId double
    Numeric tunnel identifier on the wire (e.g. a GRE key), not the NetBox id.
    Url string
    VpnTunnelGroupId double
    Id of the tunnel group.
    VpnTunnelId double
    NetBox id.
    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
    Encapsulation string
    Tunnel encapsulation protocol. One of: ipsec-transport, ipsec-tunnel, ip-ip, gre, wireguard, openvpn, l2tp, pptp.
    IpsecProfileId float64
    Id of the IPsec profile.
    LastUpdated string
    Name string
    OwnerId float64
    Id of the owner the object is assigned to.
    Status string
    Operational status. One of: planned, active, disabled.
    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.
    TerminationCount float64
    Number of terminations of the tunnel.
    TunnelGroupId float64
    Deprecated alias of vpntunnelgroup_id.

    Deprecated: Deprecated

    TunnelId float64
    Numeric tunnel identifier on the wire (e.g. a GRE key), not the NetBox id.
    Url string
    VpnTunnelGroupId float64
    Id of the tunnel group.
    VpnTunnelId float64
    NetBox id.
    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
    encapsulation string
    Tunnel encapsulation protocol. One of: ipsec-transport, ipsec-tunnel, ip-ip, gre, wireguard, openvpn, l2tp, pptp.
    ipsec_profile_id number
    Id of the IPsec profile.
    last_updated string
    name string
    owner_id number
    Id of the owner the object is assigned to.
    status string
    Operational status. One of: planned, active, disabled.
    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.
    termination_count number
    Number of terminations of the tunnel.
    tunnel_group_id number
    Deprecated alias of vpntunnelgroup_id.

    Deprecated: Deprecated

    tunnel_id number
    Numeric tunnel identifier on the wire (e.g. a GRE key), not the NetBox id.
    url string
    vpn_tunnel_group_id number
    Id of the tunnel group.
    vpn_tunnel_id number
    NetBox id.
    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
    encapsulation String
    Tunnel encapsulation protocol. One of: ipsec-transport, ipsec-tunnel, ip-ip, gre, wireguard, openvpn, l2tp, pptp.
    ipsecProfileId Double
    Id of the IPsec profile.
    lastUpdated String
    name String
    ownerId Double
    Id of the owner the object is assigned to.
    status String
    Operational status. One of: planned, active, disabled.
    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.
    terminationCount Double
    Number of terminations of the tunnel.
    tunnelGroupId Double
    Deprecated alias of vpntunnelgroup_id.

    Deprecated: Deprecated

    tunnelId Double
    Numeric tunnel identifier on the wire (e.g. a GRE key), not the NetBox id.
    url String
    vpnTunnelGroupId Double
    Id of the tunnel group.
    vpnTunnelId Double
    NetBox id.
    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
    encapsulation string
    Tunnel encapsulation protocol. One of: ipsec-transport, ipsec-tunnel, ip-ip, gre, wireguard, openvpn, l2tp, pptp.
    ipsecProfileId number
    Id of the IPsec profile.
    lastUpdated string
    name string
    ownerId number
    Id of the owner the object is assigned to.
    status string
    Operational status. One of: planned, active, disabled.
    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.
    terminationCount number
    Number of terminations of the tunnel.
    tunnelGroupId number
    Deprecated alias of vpntunnelgroup_id.

    Deprecated: Deprecated

    tunnelId number
    Numeric tunnel identifier on the wire (e.g. a GRE key), not the NetBox id.
    url string
    vpnTunnelGroupId number
    Id of the tunnel group.
    vpnTunnelId number
    NetBox id.
    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
    encapsulation str
    Tunnel encapsulation protocol. One of: ipsec-transport, ipsec-tunnel, ip-ip, gre, wireguard, openvpn, l2tp, pptp.
    ipsec_profile_id float
    Id of the IPsec profile.
    last_updated str
    name str
    owner_id float
    Id of the owner the object is assigned to.
    status str
    Operational status. One of: planned, active, disabled.
    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.
    termination_count float
    Number of terminations of the tunnel.
    tunnel_group_id float
    Deprecated alias of vpntunnelgroup_id.

    Deprecated: Deprecated

    tunnel_id float
    Numeric tunnel identifier on the wire (e.g. a GRE key), not the NetBox id.
    url str
    vpn_tunnel_group_id float
    Id of the tunnel group.
    vpn_tunnel_id float
    NetBox id.
    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
    encapsulation String
    Tunnel encapsulation protocol. One of: ipsec-transport, ipsec-tunnel, ip-ip, gre, wireguard, openvpn, l2tp, pptp.
    ipsecProfileId Number
    Id of the IPsec profile.
    lastUpdated String
    name String
    ownerId Number
    Id of the owner the object is assigned to.
    status String
    Operational status. One of: planned, active, disabled.
    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.
    terminationCount Number
    Number of terminations of the tunnel.
    tunnelGroupId Number
    Deprecated alias of vpntunnelgroup_id.

    Deprecated: Deprecated

    tunnelId Number
    Numeric tunnel identifier on the wire (e.g. a GRE key), not the NetBox id.
    url String
    vpnTunnelGroupId Number
    Id of the tunnel group.
    vpnTunnelId Number
    NetBox id.

    Import

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

    terraform

    import {

    to = netbox_vpn_tunnel.test

    id = “123”

    }

    The pulumi import command can be used, for example:

    $ pulumi import netbox:index/vpnTunnel:VpnTunnel 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