CommunityToolkit.Aspire.Hosting.Bitwarden.SecretManager
📦 CommunityToolkit.Aspire.Hosting.Bitwarden.SecretManagerv13.6.1Import path
apphost/modules/aspire20Functions
2Types
2 types, 20 functions and 0 members
Handles
Functions
BitwardenSecretManagerResource
method
AddSecretbuilderAdds 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) BitwardenSecretResourcemethod
AddSecretWithRemoteNamebuilderAdds 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) BitwardenSecretResourcemethod
GetSecretbuilderGets 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) BitwardenSecretResourcemethod
GetSecretByIdbuilderGets 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) BitwardenSecretResourcemethod
GetSecretWithRemoteNamebuilderGets 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) BitwardenSecretResourcemethod
WithApiUrlbuilderOverrides the Bitwarden API URL.
WithApiUrl(apiUrl string) BitwardenSecretManagerResourcemethod
WithApiUrlFromExternalServicebuilderOverrides the Bitwarden API URL using an external service resource. The Bitwarden resource will wait for the external service before authenticating.
WithApiUrlFromExternalService(server ExternalServiceResource) BitwardenSecretManagerResourcemethod
WithApiUrlFromParameterbuilderOverrides the Bitwarden API URL using a parameter.
WithApiUrlFromParameter(apiUrl ParameterResource) BitwardenSecretManagerResourcemethod
WithAuthCacheDirectorybuilderOverrides 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) BitwardenSecretManagerResourcemethod
WithCacheFilebuilderOverrides 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) BitwardenSecretManagerResourcemethod
WithIdentityUrlbuilderOverrides the Bitwarden identity URL.
WithIdentityUrl(identityUrl string) BitwardenSecretManagerResourcemethod
WithIdentityUrlFromExternalServicebuilderOverrides the Bitwarden identity URL using an external service resource. The Bitwarden resource will wait for the external service before authenticating.
WithIdentityUrlFromExternalService(server ExternalServiceResource) BitwardenSecretManagerResourcemethod
WithIdentityUrlFromParameterbuilderOverrides the Bitwarden identity URL using a parameter.
WithIdentityUrlFromParameter(identityUrl ParameterResource) BitwardenSecretManagerResourceResourceWithEnvironment
method
WithBitwardenReferenceAccessTokenbuilderOverrides 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) ResourceWithEnvironmentmethod
WithBitwardenReferenceAuthCacheDirectorybuilderConfigures the directory where the Bitwarden SDK stores its auth cache inside the resource, for the connection associated with
source.WithBitwardenReferenceAuthCacheDirectory(source BitwardenSecretManagerResource, authCacheDirectory string) ResourceWithEnvironmentmethod
WithBitwardenReferenceAuthCacheDirectoryFromParameterbuilderConfigures 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) ResourceWithEnvironmentmethod
WithBitwardenReferenceAuthCacheVolumebuilderMounts 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) ResourceWithEnvironmentmethod
WithBitwardenSecretManagerReferencebuilderInjects structured Bitwarden client configuration into the destination resource.
WithBitwardenSecretManagerReference(source BitwardenSecretManagerResource, options ...*WithBitwardenSecretManagerReferenceOptions) ResourceWithEnvironment