Skip to content
DocsTry Aspire
DocsTry

CommunityToolkit.Aspire.Hosting.Bitwarden.SecretManager

📦 CommunityToolkit.Aspire.Hosting.Bitwarden.SecretManagerv13.5.0
20Functions
2Types

Types

Functions

methodaddBitwardenSecretManagerbuilder
Adds a Bitwarden Secrets Manager resource. The `projectNameOrId` parameter resolves to either a project name (creates or finds by name) or a project identifier GUID (adopts the existing project by ID).
addBitwardenSecretManager(name: string, projectNameOrId: ParameterResource, organizationId: ParameterResource, accessToken: ParameterResource): BitwardenSecretManagerResource
methodaddSecretbuilder
Adds a managed Bitwarden secret whose local and remote names are the same. The secret value is resolved from configuration key `Parameters:{parentName}-{name}`.
addSecret(name: string): BitwardenSecretResource
methodaddSecretWithRemoteNamebuilder
Adds a managed Bitwarden secret with distinct Aspire and remote names. The secret value is resolved from configuration key `Parameters:{parentName}-{name}`.
addSecretWithRemoteName(name: string, remoteName: string): BitwardenSecretResource
methodasSecretId
Returns an `IExpressionValue` that resolves to the Bitwarden secret identifier. Pass it to `WithEnvironment` to inject the secret ID as an environment variable. The app then uses the Bitwarden SDK to fetch the secret value at runtime.
asSecretId(): IExpressionValue
methodgetSecretbuilder
Gets or creates a Bitwarden secret reference whose Aspire and remote names are the same. The secret must already exist in Bitwarden; use `AddSecret` if Aspire should own and write the secret value.
getSecret(name: string): BitwardenSecretResource
methodgetSecretByIdbuilder
Gets or creates a Bitwarden secret reference by secret identifier. Use this when multiple secrets share the same name and the identifier is the only unambiguous key. The secret must already exist in Bitwarden; use `AddSecret` if Aspire should own and write the secret value.
getSecretById(name: string, secretId: guid): BitwardenSecretResource
methodgetSecretWithRemoteNamebuilder
Gets or creates a Bitwarden secret reference with distinct Aspire and remote names. The secret must already exist in Bitwarden; use `AddSecret` if Aspire should own and write the secret value.
getSecretWithRemoteName(name: string, remoteName: string): BitwardenSecretResource
methodwithApiUrlbuilder
Overrides the Bitwarden API URL.
withApiUrl(apiUrl: string): BitwardenSecretManagerResource
methodwithApiUrlFromExternalServicebuilder
Overrides the Bitwarden API URL using an external service resource. The Bitwarden resource will wait for the external service before authenticating.
withApiUrlFromExternalService(server: ExternalServiceResource): BitwardenSecretManagerResource
methodwithApiUrlFromParameterbuilder
Overrides the Bitwarden API URL using a parameter.
withApiUrlFromParameter(apiUrl: ParameterResource): BitwardenSecretManagerResource
methodwithAuthCacheDirectorybuilder
Overrides the AppHost auth cache directory (Bitwarden SDK auth session used by the AppHost reconciler). Defaults to the Aspire store when not set. Override to reuse a cached auth session across CI runs. To configure the auth cache directory inside the deployed app, use `WithBitwardenAuthCacheDirectory``1`.
withAuthCacheDirectory(authCacheDirectory: string): BitwardenSecretManagerResource
methodwithBitwardenReferenceAccessTokenbuilder
Overrides the Bitwarden access token injected into the connection for `source`. By default the management token is used. Supply a least-privilege read-only token here.
withBitwardenReferenceAccessToken(source: BitwardenSecretManagerResource, accessToken: ParameterResource): IResourceWithEnvironment
methodwithBitwardenReferenceAuthCacheDirectorybuilder
Configures the directory where the Bitwarden SDK stores its auth cache inside the resource, for the connection associated with `source`.
withBitwardenReferenceAuthCacheDirectory(source: BitwardenSecretManagerResource, authCacheDirectory: string): IResourceWithEnvironment
methodwithBitwardenReferenceAuthCacheDirectoryFromParameterbuilder
Configures the directory where the Bitwarden SDK stores its auth cache inside the resource, using a parameter, for the connection associated with `source`.
withBitwardenReferenceAuthCacheDirectoryFromParameter(source: BitwardenSecretManagerResource, authCacheDirectory: ParameterResource): IResourceWithEnvironment
methodwithBitwardenReferenceAuthCacheVolumebuilder
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``1` instead.
withBitwardenReferenceAuthCacheVolume(source: BitwardenSecretManagerResource, volumeName?: string, containerDirectory?: string): IResourceWithEnvironment
methodwithBitwardenSecretManagerReferencebuilder
Injects structured Bitwarden client configuration into the destination resource.
withBitwardenSecretManagerReference(source: BitwardenSecretManagerResource, connectionName?: string): IResourceWithEnvironment
methodwithCacheFilebuilder
Overrides the AppHost cache file path (integration bookkeeping: Bitwarden project ID, secret ID mappings). Defaults to `.bitwarden/{resourceName}.{environment}.json` relative to the AppHost directory. Override to share the cache across multiple AppHost projects, or to store it in a CI cache directory.
withCacheFile(cacheFile: string): BitwardenSecretManagerResource
methodwithIdentityUrlbuilder
Overrides the Bitwarden identity URL.
withIdentityUrl(identityUrl: string): BitwardenSecretManagerResource
methodwithIdentityUrlFromExternalServicebuilder
Overrides the Bitwarden identity URL using an external service resource. The Bitwarden resource will wait for the external service before authenticating.
withIdentityUrlFromExternalService(server: ExternalServiceResource): BitwardenSecretManagerResource
methodwithIdentityUrlFromParameterbuilder
Overrides the Bitwarden identity URL using a parameter.
withIdentityUrlFromParameter(identityUrl: ParameterResource): BitwardenSecretManagerResource