# WithDataBindMount

- Module: [Aspire.Hosting.RabbitMQ](/reference/api/go/aspire.hosting.rabbitmq.md)
- Version: `17.0.0`
- Kind: `method`
- Defined on: [`RabbitMQServerResource`](/reference/api/go/aspire.hosting.rabbitmq/rabbitmqserverresource.md)
- Source: [GitHub](https://github.com/microsoft/aspire/tree/2d325b13709752ba6d9a943635c5e2940a2530c0)

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

## Definition

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

## 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

[`RabbitMQServerResource`](/reference/api/go/aspire.hosting.rabbitmq/rabbitmqserverresource.md) -- The resource builder.

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

## Applies to

- [`RabbitMQServerResource`](/reference/api/go/aspire.hosting.rabbitmq/rabbitmqserverresource.md)
