# RedPandaServerResource.WithDataBindMount

- Module: [CommunityToolkit.Aspire.Hosting.RedPanda](/reference/api/go/communitytoolkit.aspire.hosting.redpanda.md)
- Defined on: [RedPandaServerResource](/reference/api/go/communitytoolkit.aspire.hosting.redpanda/redpandaserverresource.md)
- Version: `13.6.1`
- Kind: `method`

Adds a bind mount for the data folder to a Redpanda container resource.

## Definition

```go
type RedPandaServerResource interface {
    // ... omitted for brevity
    WithDataBindMount(
        source string,
        options ...*WithDataBindMountOptions,
    ) RedPandaServerResource
}
```

## Signature

```go
WithDataBindMount(
    source string,
    options ...*WithDataBindMountOptions,
) RedPandaServerResource
```

## Parameters

- `source` (`string`) -- The source directory on the host to mount into the container.
- `options` (`...*WithDataBindMountOptions`) -- optional settings, see [Options](#options)

## Options

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

- `IsReadOnly` (`*bool`) -- A flag that indicates if this is a read-only mount.

## Returns

[`RedPandaServerResource`](/reference/api/go/communitytoolkit.aspire.hosting.redpanda/redpandaserverresource.md) -- A reference to the `IResourceBuilder`.

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

## Defined on

- [RedPandaServerResource](/reference/api/go/communitytoolkit.aspire.hosting.redpanda/redpandaserverresource.md) -- `handle`
