Aspirerelease/17.0
Watch Aspire live streamsDocsTry Aspire

CommunityToolkit.Aspire.Hosting.Bitwarden.SecretManager

📦 CommunityToolkit.Aspire.Hosting.Bitwarden.SecretManagerv13.6.1
Import pathapphost/modules/aspire
20Functions
2Types

Handles

Functions

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
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 string) 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.
WithAuthCacheDirectory(authCacheDirectory string) 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
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

ResourceWithEnvironment

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) ResourceWithEnvironment
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) ResourceWithEnvironment
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) ResourceWithEnvironment
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 instead.
WithBitwardenReferenceAuthCacheVolume(source BitwardenSecretManagerResource, options ...*WithBitwardenReferenceAuthCacheVolumeOptions) ResourceWithEnvironment
methodWithBitwardenSecretManagerReferencebuilder
Injects structured Bitwarden client configuration into the destination resource.
WithBitwardenSecretManagerReference(source BitwardenSecretManagerResource, options ...*WithBitwardenSecretManagerReferenceOptions) ResourceWithEnvironment