# LogtoResource.WithDataVolume

- Module: [CommunityToolkit.Aspire.Hosting.Logto](/reference/api/go/communitytoolkit.aspire.hosting.logto.md)
- Defined on: [LogtoResource](/reference/api/go/communitytoolkit.aspire.hosting.logto/logtoresource.md)
- Version: `13.6.1`
- Kind: `method`

Configures the Logto resource with a data volume, allowing persistent storage.

## Definition

```go
type LogtoResource interface {
    // ... omitted for brevity
    WithDataVolume(options ...*WithDataVolumeOptions) LogtoResource
}
```

## Signature

```go
WithDataVolume(options ...*WithDataVolumeOptions) LogtoResource
```

## Parameters

- `options` (`...*WithDataVolumeOptions`) -- optional settings, see [Options](#options)

## Options

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

- `Name` (`*string`) -- The optional name of the data volume. If not provided, a default name is generated.

## Returns

[`LogtoResource`](/reference/api/go/communitytoolkit.aspire.hosting.logto/logtoresource.md) -- The resource builder configured with the specified data volume.

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

## Defined on

- [LogtoResource](/reference/api/go/communitytoolkit.aspire.hosting.logto/logtoresource.md) -- `handle`
