Aspirerelease/17.0
Watch Aspire live streamsDocsTry Aspire

WithPostgres

Method
📦 CommunityToolkit.Aspire.Hosting.Keycloak.Extensions v13.5.1-beta.895
func (KeycloakResource) WithPostgres(
database PostgresDatabaseResource,
options ...*WithPostgresOptions,
) KeycloakResource

Signature

methodWithPostgresbuilder
WithPostgres(
database PostgresDatabaseResource,
options ...*WithPostgresOptions,
) KeycloakResource
databasePostgresDatabaseResourceThe resource builder for the Postgres database that Keycloak will connect to.
options...*WithPostgresOptionsOptional settings, described under Options.

Optional parameters are passed in a trailing options ...*WithPostgresOptions argument.

Username*ParameterResource(Optional) The resource builder for the parameter defining the database username. If not provided, the parent database resource's username parameter will be used.
Password*ParameterResource(Optional) The resource builder for the parameter defining the database password. If not provided, the parent database resource's password parameter will be used.
XaEnabled*boolA boolean flag indicating whether XA transactions are enabled. Defaults to false.
KeycloakResource

An updated resource builder with Postgres integration configured for the Keycloak resource.

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

Applies to

This method applies to the following types: