Skip to content
DocsTry Aspire
DocsTry

BitwardenSecretManagerResource

Handle
📦 CommunityToolkit.Aspire.Hosting.Bitwarden.SecretManager v13.5.0
interface BitwardenSecretManagerResource
extends IResource,
IResourceWithWaitSupport {
addSecret(name: string): BitwardenSecretResource;
addSecretWithRemoteName(
name: string,
remoteName: string): BitwardenSecretResource;
getSecret(name: string): BitwardenSecretResource;
getSecretById(
name: string,
secretId: guid): BitwardenSecretResource;
getSecretWithRemoteName(
name: string,
remoteName: string): BitwardenSecretResource;
withApiUrl(apiUrl: string): BitwardenSecretManagerResource;
withApiUrlFromExternalService(server: ExternalServiceResource): BitwardenSecretManagerResource;
withApiUrlFromParameter(apiUrl: ParameterResource): BitwardenSecretManagerResource;
withAuthCacheDirectory(authCacheDirectory: string): BitwardenSecretManagerResource;
withCacheFile(cacheFile: string): BitwardenSecretManagerResource;
withIdentityUrl(identityUrl: string): BitwardenSecretManagerResource;
withIdentityUrlFromExternalService(server: ExternalServiceResource): BitwardenSecretManagerResource;
withIdentityUrlFromParameter(identityUrl: ParameterResource): BitwardenSecretManagerResource;
}

Methods

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
namestring
BitwardenSecretResource
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
namestring
remoteNamestring
BitwardenSecretResource
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
namestring
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
namestring
secretIdguid
BitwardenSecretResource
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
namestring
remoteNamestring
BitwardenSecretResource
methodwithApiUrlbuilder
Overrides the Bitwarden API URL.
withApiUrl(apiUrl: string): BitwardenSecretManagerResource
apiUrlstring
BitwardenSecretManagerResource
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
serverExternalServiceResource
BitwardenSecretManagerResource
Overrides the Bitwarden API URL using a parameter.
withApiUrlFromParameter(apiUrl: ParameterResource): BitwardenSecretManagerResource
apiUrlParameterResource
BitwardenSecretManagerResource
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
authCacheDirectorystring
BitwardenSecretManagerResource
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
cacheFilestring
BitwardenSecretManagerResource
methodwithIdentityUrlbuilder
Overrides the Bitwarden identity URL.
withIdentityUrl(identityUrl: string): BitwardenSecretManagerResource
identityUrlstring
BitwardenSecretManagerResource
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
serverExternalServiceResource
BitwardenSecretManagerResource
Overrides the Bitwarden identity URL using a parameter.
withIdentityUrlFromParameter(identityUrl: ParameterResource): BitwardenSecretManagerResource
identityUrlParameterResource
BitwardenSecretManagerResource