Skip to the content.

Application Tunnel

Module: services/tunnel · Image: nebius-mocker-tunnel · NEBIUS_MOCKER_SERVICES=tunnel M1 tier: T1 (inventory only) · Endpoint: applicationtunnel.mkt.api.nebius.cloud

Overview

Nebius Tunnels expose a service on a VM, a laptop or any host behind a firewall at https://<service>-<masked_id>.tunnel.applications.<region>.nebius.cloud. Nothing needs inbound ports. Three pieces make it work:

Tunnels add no user authentication: the edge only secures transport.

Implementation status

Piece Status
nebius.tunnel.v1.TunnelService: Create, Get, List (paged), Update (full replace with X-ResetMask), Delete ✅ T1, inventory only
status: state CREATED, connection_state CONNECTION_STATE_DISCONNECTED, no services ✅ (always, see “Not yet”)
Role applicationtunnel.agent (grants applicationtunnel.tunnels.get), grantable with access permits on a tunnel ✅
Authorization: applicationtunnel.tunnels.* for every RPC ✅
nebius_tunnel_v1_tunnel resource and data source with the official provider ✅ e2e: test/terraform/tunnel
nebius tunnel CLI flows (create, get, list, update, delete; the agent’s IAM setup) ✅ e2e: test/cli/tunnel
Tunnel data plane: agent connection, edge, public endpoints, nebius tunnel connect / ssh-config Not yet (see below)
List filter Rejected with INVALID_ARGUMENT

Verified against: nebius/api@4522189, terraform-provider-nebius v0.6.91, gosdk v0.2.100, nebius CLI 0.12.312, nebius-tunnel-agent 1.2.0.

Covered by unit tests (services/tunnel/{domain,dal,api}), gosdk contract tests (test/contract/tunnel_*: CRUD, reset mask, error kinds, per-role authorization, the agent role), the Terraform e2e suite (test/terraform/tunnel) and the CLI e2e suite (test/cli/tunnel). make e2e runs the last two.

Behavior notes

These follow the protos. Where they don’t say what happens, the mock’s choice is marked (mock).

Authorization

The permissions are applicationtunnel.tunnels.{get,list,create,update,delete}. They are checked on the tunnel, or on the project for Create and List. viewer reads, editor and admin write. applicationtunnel.agent grants applicationtunnel.tunnels.get only, on the resource it is bound to and its descendants. That supports the documented agent setup: a service account in a group, with an access permit for that group on the tunnel. Such an account can read its tunnel, but can’t modify it or list the project. Reading another tunnel answers NOT_FOUND, because a denied read doesn’t reveal that the resource exists.

Not yet

Terraform

test/terraform/tunnel runs the official provider under enforce. The steps are create, an empty plan, an in-place update, another empty plan, removing description (cleared through X-ResetMask), an empty plan, replacement on parent_id, the data source, and destroy. The Go SDK checks the mock’s state after every step.

Kind Terraform type Service RPCs called Tested
Resource nebius_tunnel_v1_tunnel nebius.tunnel.v1.TunnelService Get, Create, Update, Delete + OperationService.Get ✅
Data source nebius_tunnel_v1_tunnel nebius.tunnel.v1.TunnelService Get ✅

CLI

test/cli/tunnel runs nebius tunnel create, get, list, update and delete. It then runs the agent’s IAM setup from Connect to a tunnel, all with the CLI:

  1. nebius iam service-account create, group create, access-permit create --role applicationtunnel.agent on the tunnel, group-membership create, and auth-public-key create.
  2. As that service account, nebius tunnel get on its tunnel works, while update, delete and list are PERMISSION_DENIED, and get of another tunnel is NOT_FOUND.

API surface

nebius.tunnel.v1.TunnelService

Endpoint: applicationtunnel.mkt.api.nebius.cloud:443 · Proto: nebius/tunnel/v1/tunnel_service.proto · used by Terraform

RPC Request Response TF
Get GetTunnelRequest Tunnel ✅
List ListTunnelRequest ListTunnelsResponse  
Create CreateTunnelRequest common.v1.Operation ✅
Update UpdateTunnelRequest common.v1.Operation ✅
Delete DeleteTunnelRequest common.v1.Operation ✅