published on Wednesday, Nov 4, 2026 by e-breuninger
published on Wednesday, Nov 4, 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 = netbox.getVpnTunnel({
name: "test-vpn_tunnel",
});
import pulumi
import pulumi_netbox as netbox
test = netbox.get_vpn_tunnel(name="test-vpn_tunnel")
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.LookupVpnTunnel(ctx, &netbox.LookupVpnTunnelArgs{
Name: pulumi.StringRef("test-vpn_tunnel"),
}, 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.GetVpnTunnel.Invoke(new()
{
Name = "test-vpn_tunnel",
});
});
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.GetVpnTunnelArgs;
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.getVpnTunnel(GetVpnTunnelArgs.builder()
.name("test-vpn_tunnel")
.build());
}
}
variables:
test:
fn::invoke:
function: netbox:getVpnTunnel
arguments:
name: test-vpn_tunnel
Example coming soon!
Using getVpnTunnel
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 getVpnTunnel(args: GetVpnTunnelArgs, opts?: InvokeOptions): Promise<GetVpnTunnelResult>
function getVpnTunnelOutput(args: GetVpnTunnelOutputArgs, opts?: InvokeOutputOptions): Output<GetVpnTunnelResult>def get_vpn_tunnel(custom_field_filters: Optional[Mapping[str, str]] = None,
name: Optional[str] = None,
owner_id: Optional[float] = None,
tag_slug: Optional[str] = None,
vpn_tunnel_group_id: Optional[float] = None,
opts: Optional[InvokeOptions] = None) -> GetVpnTunnelResult
def get_vpn_tunnel_output(custom_field_filters: pulumi.Input[Optional[Mapping[str, pulumi.Input[str]]]] = None,
name: pulumi.Input[Optional[str]] = None,
owner_id: pulumi.Input[Optional[float]] = None,
tag_slug: pulumi.Input[Optional[str]] = None,
vpn_tunnel_group_id: pulumi.Input[Optional[float]] = None,
opts: Optional[InvokeOutputOptions] = None) -> Output[GetVpnTunnelResult]func LookupVpnTunnel(ctx *Context, args *LookupVpnTunnelArgs, opts ...InvokeOption) (*LookupVpnTunnelResult, error)
func LookupVpnTunnelOutput(ctx *Context, args *LookupVpnTunnelOutputArgs, opts ...InvokeOption) LookupVpnTunnelResultOutput> Note: This function is named LookupVpnTunnel in the Go SDK.
public static class GetVpnTunnel
{
public static Task<GetVpnTunnelResult> InvokeAsync(GetVpnTunnelArgs args, InvokeOptions? opts = null)
public static Output<GetVpnTunnelResult> Invoke(GetVpnTunnelInvokeArgs args, InvokeOptions? opts = null)
public static Output<GetVpnTunnelResult> Invoke(GetVpnTunnelInvokeArgs args, InvokeOutputOptions opts)
}public static CompletableFuture<GetVpnTunnelResult> getVpnTunnel(GetVpnTunnelArgs args, InvokeOptions options)
public static Output<GetVpnTunnelResult> getVpnTunnel(GetVpnTunnelArgs args, InvokeOptions options)
public static Output<GetVpnTunnelResult> getVpnTunnel(GetVpnTunnelArgs args, InvokeOutputOptions options)
fn::invoke:
function: netbox:index/getVpnTunnel:getVpnTunnel
arguments:
# arguments dictionarydata "netbox_get_vpn_tunnel" "name" {
# arguments
}The following arguments are supported:
- Custom
Field Dictionary<string, string>Filters - 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.
- Name string
- Owner
Id double - Id of the owner the object is assigned to.
- string
- Slug of a tag the object carries.
- Vpn
Tunnel doubleGroup Id - Id of the tunnel group.
- Custom
Field map[string]stringFilters - 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.
- Name string
- Owner
Id float64 - Id of the owner the object is assigned to.
- string
- Slug of a tag the object carries.
- Vpn
Tunnel float64Group Id - Id of the tunnel group.
- custom_
field_ map(string)filters - 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.
- name string
- owner_
id number - Id of the owner the object is assigned to.
- tag_
slug string - Slug of a tag the object carries.
- vpn_
tunnel_ numbergroup_ id - Id of the tunnel group.
- custom
Field Map<String,String>Filters - 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.
- name String
- owner
Id Double - Id of the owner the object is assigned to.
- String
- Slug of a tag the object carries.
- vpn
Tunnel DoubleGroup Id - Id of the tunnel group.
- custom
Field {[key: string]: string}Filters - 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.
- name string
- owner
Id number - Id of the owner the object is assigned to.
- string
- Slug of a tag the object carries.
- vpn
Tunnel numberGroup Id - Id of the tunnel group.
- custom_
field_ Mapping[str, str]filters - 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.
- name str
- owner_
id float - Id of the owner the object is assigned to.
- tag_
slug str - Slug of a tag the object carries.
- vpn_
tunnel_ floatgroup_ id - Id of the tunnel group.
- custom
Field Map<String>Filters - 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.
- name String
- owner
Id Number - Id of the owner the object is assigned to.
- String
- Slug of a tag the object carries.
- vpn
Tunnel NumberGroup Id - Id of the tunnel group.
getVpnTunnel Result
The following output properties are available:
- Comments string
- Created string
- Custom
Fields 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.
- Id double
- NetBox id.
- Ipsec
Profile doubleId - Id of the IPsec profile.
- Last
Updated string - Name string
- Owner
Id double - Id of the owner the object is assigned to.
- Status string
- Operational status. One of: planned, active, disabled.
- List<string>
- Slugs of the tags assigned to the object (the provider's defaulttags are added on top, see tagsall).
- List<string>
- Slugs of all tags on the object, including the provider's default_tags.
- Tenant
Id double - Id of the tenant.
- Termination
Count double - Number of terminations of the tunnel.
- Tunnel
Group doubleId - Deprecated alias of vpntunnelgroup_id.
- Tunnel
Id double - Numeric tunnel identifier on the wire (e.g. a GRE key), not the NetBox id.
- Url string
- Vpn
Tunnel doubleGroup Id - Id of the tunnel group.
- Custom
Field Dictionary<string, string>Filters - 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.
- string
- Slug of a tag the object carries.
- Comments string
- Created string
- Custom
Fields 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.
- Id float64
- NetBox id.
- Ipsec
Profile float64Id - Id of the IPsec profile.
- Last
Updated string - Name string
- Owner
Id float64 - Id of the owner the object is assigned to.
- Status string
- Operational status. One of: planned, active, disabled.
- []string
- Slugs of the tags assigned to the object (the provider's defaulttags are added on top, see tagsall).
- []string
- Slugs of all tags on the object, including the provider's default_tags.
- Tenant
Id float64 - Id of the tenant.
- Termination
Count float64 - Number of terminations of the tunnel.
- Tunnel
Group float64Id - Deprecated alias of vpntunnelgroup_id.
- Tunnel
Id float64 - Numeric tunnel identifier on the wire (e.g. a GRE key), not the NetBox id.
- Url string
- Vpn
Tunnel float64Group Id - Id of the tunnel group.
- Custom
Field map[string]stringFilters - 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.
- string
- Slug of a tag the object carries.
- 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.
- id number
- NetBox id.
- ipsec_
profile_ numberid - 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.
- list(string)
- Slugs of the tags assigned to the object (the provider's defaulttags are added on top, see tagsall).
- 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_ numberid - Deprecated alias of vpntunnelgroup_id.
- tunnel_
id number - Numeric tunnel identifier on the wire (e.g. a GRE key), not the NetBox id.
- url string
- vpn_
tunnel_ numbergroup_ id - Id of the tunnel group.
- custom_
field_ map(string)filters - 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.
- comments String
- created String
- custom
Fields 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.
- id Double
- NetBox id.
- ipsec
Profile DoubleId - Id of the IPsec profile.
- last
Updated String - name String
- owner
Id Double - Id of the owner the object is assigned to.
- status String
- Operational status. One of: planned, active, disabled.
- List<String>
- Slugs of the tags assigned to the object (the provider's defaulttags are added on top, see tagsall).
- List<String>
- Slugs of all tags on the object, including the provider's default_tags.
- tenant
Id Double - Id of the tenant.
- termination
Count Double - Number of terminations of the tunnel.
- tunnel
Group DoubleId - Deprecated alias of vpntunnelgroup_id.
- tunnel
Id Double - Numeric tunnel identifier on the wire (e.g. a GRE key), not the NetBox id.
- url String
- vpn
Tunnel DoubleGroup Id - Id of the tunnel group.
- custom
Field Map<String,String>Filters - 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.
- String
- Slug of a tag the object carries.
- comments string
- created string
- custom
Fields {[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.
- id number
- NetBox id.
- ipsec
Profile numberId - 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.
- string[]
- Slugs of the tags assigned to the object (the provider's defaulttags are added on top, see tagsall).
- 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 numberId - Deprecated alias of vpntunnelgroup_id.
- tunnel
Id number - Numeric tunnel identifier on the wire (e.g. a GRE key), not the NetBox id.
- url string
- vpn
Tunnel numberGroup Id - Id of the tunnel group.
- custom
Field {[key: string]: string}Filters - 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.
- string
- Slug of a tag the object carries.
- 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.
- id float
- NetBox id.
- ipsec_
profile_ floatid - 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.
- Sequence[str]
- Slugs of the tags assigned to the object (the provider's defaulttags are added on top, see tagsall).
- 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_ floatid - Deprecated alias of vpntunnelgroup_id.
- tunnel_
id float - Numeric tunnel identifier on the wire (e.g. a GRE key), not the NetBox id.
- url str
- vpn_
tunnel_ floatgroup_ id - Id of the tunnel group.
- custom_
field_ Mapping[str, str]filters - 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.
- 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.
- id Number
- NetBox id.
- ipsec
Profile NumberId - 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.
- List<String>
- Slugs of the tags assigned to the object (the provider's defaulttags are added on top, see tagsall).
- 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 NumberId - Deprecated alias of vpntunnelgroup_id.
- tunnel
Id Number - Numeric tunnel identifier on the wire (e.g. a GRE key), not the NetBox id.
- url String
- vpn
Tunnel NumberGroup Id - Id of the tunnel group.
- custom
Field Map<String>Filters - 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.
- 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
netboxTerraform Provider.
published on Wednesday, Nov 4, 2026 by e-breuninger