CommunityToolkit.Aspire.Hosting.Bitwarden.SecretManager
📦 CommunityToolkit.Aspire.Hosting.Bitwarden.SecretManagerv13.5.020Functions
2Types
2 types and 0 members
Types
Functions
method
addBitwardenSecretManagerbuilderAdds 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): BitwardenSecretManagerResourcemethod
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
asSecretIdReturns 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(): IExpressionValuemethod
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: guid): 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``1`.
withAuthCacheDirectory(authCacheDirectory: string): BitwardenSecretManagerResourcemethod
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): IResourceWithEnvironmentmethod
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): IResourceWithEnvironmentmethod
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): IResourceWithEnvironmentmethod
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``1` instead.
withBitwardenReferenceAuthCacheVolume(source: BitwardenSecretManagerResource, volumeName?: string, containerDirectory?: string): IResourceWithEnvironmentmethod
withBitwardenSecretManagerReferencebuilderInjects structured Bitwarden client configuration into the destination resource.
withBitwardenSecretManagerReference(source: BitwardenSecretManagerResource, connectionName?: string): IResourceWithEnvironmentmethod
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): BitwardenSecretManagerResource