Aspirerelease/17.0
Watch Aspire live streamsDocsTry Aspire

BitwardenSecretManagerResource

Handle
📦 CommunityToolkit.Aspire.Hosting.Bitwarden.SecretManager v13.6.1

Represents a Bitwarden Secrets Manager project and secret graph.

type BitwardenSecretManagerResource interface {
Resource
ResourceWithWaitSupport
}

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

The managed secret resource builder.

Returns a handle; failures surface later via Err().

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

The managed secret resource builder.

Returns a handle; failures surface later via Err().

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

A resource builder for the secret reference.

Returns a handle; failures surface later via Err().

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
namestringThe Aspire resource name.
secretIdstringThe Bitwarden secret identifier.
BitwardenSecretResource

A resource builder for the secret reference.

Returns a handle; failures surface later via Err().

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

A resource builder for the secret reference.

Returns a handle; failures surface later via Err().

methodWithApiUrlbuilder
Overrides the Bitwarden API URL.
WithApiUrl(apiUrl string) BitwardenSecretManagerResource
apiUrlstringThe absolute Bitwarden API URL.
BitwardenSecretManagerResource

The resource builder.

Returns a handle; failures surface later via Err().

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

The resource builder.

Returns a handle; failures surface later via Err().

Overrides the Bitwarden API URL using a parameter.
WithApiUrlFromParameter(apiUrl ParameterResource) BitwardenSecretManagerResource
apiUrlParameterResourceThe parameter that resolves to the absolute Bitwarden API URL.
BitwardenSecretManagerResource

The resource builder.

Returns a handle; failures surface later via Err().

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
authCacheDirectorystringThe auth cache directory on the AppHost, relative to the Aspire store when not rooted.
BitwardenSecretManagerResource

The resource builder.

Returns a handle; failures surface later via Err().

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

The resource builder.

Returns a handle; failures surface later via Err().

methodWithIdentityUrlbuilder
Overrides the Bitwarden identity URL.
WithIdentityUrl(identityUrl string) BitwardenSecretManagerResource
identityUrlstringThe absolute Bitwarden identity URL.
BitwardenSecretManagerResource

The resource builder.

Returns a handle; failures surface later via Err().

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

The resource builder.

Returns a handle; failures surface later via Err().

Overrides the Bitwarden identity URL using a parameter.
WithIdentityUrlFromParameter(identityUrl ParameterResource) BitwardenSecretManagerResource
identityUrlParameterResourceThe parameter that resolves to the absolute Bitwarden identity URL.
BitwardenSecretManagerResource

The resource builder.

Returns a handle; failures surface later via Err().