# DevTunnelResource.withTunnelReferenceAll

- Module: [Aspire.Hosting.DevTunnels](/reference/api/typescript/aspire.hosting.devtunnels.md)
- Defined on: [DevTunnelResource](/reference/api/typescript/aspire.hosting.devtunnels/devtunnelresource.md)
- Version: `13.4.0`
- Kind: `method`

Adds ports on the dev tunnel for all endpoints found on the referenced resource and sets whether anonymous access is allowed.

## Definition

```typescript
interface DevTunnelResource {
  // ... omitted for brevity
  withTunnelReferenceAll(
      resourceBuilder: IResourceWithEndpoints,
      allowAnonymous: boolean): DevTunnelResource;
}
```

## Signature

```typescript
withTunnelReferenceAll(
    resourceBuilder: IResourceWithEndpoints,
    allowAnonymous: boolean): DevTunnelResource
```

## Parameters

- `resourceBuilder` (`IResourceWithEndpoints`)
- `allowAnonymous` (`boolean`)

## Returns

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

## Defined on

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