# WithBitwardenReferenceAuthCacheVolume

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

Mounts a named volume and configures the Bitwarden SDK to store its auth cache there, for the connection associated with `source`. Use this for container resources. For process resources or when the container path is already known, use `WithBitwardenAuthCacheDirectory` instead.

## Definition

```go
func (ResourceWithEnvironment) WithBitwardenReferenceAuthCacheVolume(
    source BitwardenSecretManagerResource,
    options ...*WithBitwardenReferenceAuthCacheVolumeOptions,
) ResourceWithEnvironment
```

## Parameters

- `source` ([`BitwardenSecretManagerResource`](/reference/api/go/communitytoolkit.aspire.hosting.bitwarden.secretmanager/bitwardensecretmanagerresource.md)) -- The Bitwarden resource whose connection name to target.
- `options` (`...*WithBitwardenReferenceAuthCacheVolumeOptions`) -- optional settings, see [Options](#options)

## Options

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

- `VolumeName` (`*string`) -- The Docker volume name. Defaults to `{resourceName}-{connectionName}-bitwarden-auth` when `null`.
- `ContainerDirectory` (`*string`) -- The directory inside the container where the volume is mounted. Defaults to `/var/lib/bitwarden`.

## Returns

`ResourceWithEnvironment` -- The destination resource builder.

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

## Applies to

- `CSharpAppResource`
- `ContainerResource`
- `DotnetToolResource`
- `ExecutableResource`
- `ProjectResource`
