# addDevTunnel

- Module: [Aspire.Hosting.DevTunnels](/reference/api/typescript/aspire.hosting.devtunnels.md)
- Version: `13.4.0`
- Kind: `method`
- Source: [GitHub](https://github.com/microsoft/aspire)

Adds a Dev Tunnel resource to the distributed application model.

## Definition

```typescript
interface IDistributedApplicationBuilder {
  // ... omitted for brevity
  addDevTunnel(
    name: string,
    tunnelId?: string,
    allowAnonymous?: boolean,
    description?: string,
    labels?: string[]): DevTunnelResource
}
```

## Parameters

- `name` (`string`)
- `tunnelId` (`string`) `optional`
- `allowAnonymous` (`boolean`) `optional` `= False`
- `description` (`string`) `optional`
- `labels` (`string[]`) `optional`

## Returns

[DevTunnelResource](/reference/api/typescript/aspire.hosting.devtunnels/devtunnelresource.md) `builder`

## Applies to

- [IDistributedApplicationBuilder](/reference/api/typescript/aspire.hosting.devtunnels/idistributedapplicationbuilder.md)
