# AddNgrok

- Module: [CommunityToolkit.Aspire.Hosting.Ngrok](/reference/api/go/communitytoolkit.aspire.hosting.ngrok.md)
- Version: `13.6.1`
- Kind: `method`
- Defined on: `DistributedApplicationBuilder`
- Source: [GitHub](https://github.com/CommunityToolkit/Aspire/tree/d9c2addac6f527ef2e33712d290b84574b455a3b)

Configures a container resource for grok which is pre-configured to connect to the resource that this method is used on.

## Definition

```go
func (DistributedApplicationBuilder) AddNgrok(
    name string,
    options ...*AddNgrokOptions,
) NgrokResource
```

## Parameters

- `name` (`string`) -- The name of the resource.
- `options` (`...*AddNgrokOptions`) -- optional settings, see [Options](#options)

## Options

Optional parameters are passed in a trailing `options ...*AddNgrokOptions` argument.

- `ConfigurationFolder` (`*string`) -- The folder where temporary ngrok configuration files will be stored; defaults to .ngrok
- `EndpointPort` (`*float64`) -- The port of the endpoint for this resource, defaults to a randomly assigned port.
- `EndpointName` (`*string`) -- The name of the endpoint for this resource, defaults to http.
- `ConfigurationVersion` (`*float64`) -- The output version of the ngrok configuration file.

## Returns

[`NgrokResource`](/reference/api/go/communitytoolkit.aspire.hosting.ngrok/ngrokresource.md) -- A reference to the `IResourceBuilder`.

Returns a handle; failures surface later via `Err()`.

## Applies to

- `DistributedApplicationBuilder`
