Watch Aspire live streamsDocsTry Aspire

BitwardenSecretManagerResource

Handle
📦 CommunityToolkit.Aspire.Hosting.Bitwarden.SecretManager v13.6.1
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
namestringThe Aspire resource name and Bitwarden secret name.
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
namestringThe Aspire resource name.
remoteNamestringThe Bitwarden secret name.
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
namestringThe Aspire resource name and Bitwarden secret name.
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
namestringThe Aspire resource name.
secretIdguidThe Bitwarden secret identifier.
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
namestringThe Aspire resource name.
remoteNamestringThe Bitwarden secret name.
BitwardenSecretResource
methodwithApiUrlbuilder
Overrides the Bitwarden API URL.
withApiUrl(apiUrl: string): BitwardenSecretManagerResource
apiUrlstringThe absolute Bitwarden API URL.
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
serverExternalServiceResourceThe external service whose URL is used as the Bitwarden API URL.
BitwardenSecretManagerResource
Overrides the Bitwarden API URL using a parameter.
withApiUrlFromParameter(apiUrl: ParameterResource): BitwardenSecretManagerResource
apiUrlParameterResourceThe parameter that resolves to the absolute Bitwarden API URL.
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
authCacheDirectorystringThe auth cache directory on the AppHost, relative to the Aspire store when not rooted.
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
cacheFilestringThe cache file path, relative to the AppHost directory when not rooted.
BitwardenSecretManagerResource
methodwithIdentityUrlbuilder
Overrides the Bitwarden identity URL.
withIdentityUrl(identityUrl: string): BitwardenSecretManagerResource
identityUrlstringThe absolute Bitwarden identity URL.
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
serverExternalServiceResourceThe external service whose URL is used as the Bitwarden identity URL.
BitwardenSecretManagerResource
Overrides the Bitwarden identity URL using a parameter.
withIdentityUrlFromParameter(identityUrl: ParameterResource): BitwardenSecretManagerResource
identityUrlParameterResourceThe parameter that resolves to the absolute Bitwarden identity URL.
BitwardenSecretManagerResource