# PostaResource.withPostgresReference

- Module: [CommunityToolkit.Aspire.Hosting.Posta](/reference/api/typescript/communitytoolkit.aspire.hosting.posta.md)
- Defined on: [PostaResource](/reference/api/typescript/communitytoolkit.aspire.hosting.posta/postaresource.md)
- Version: `13.5.0`
- Kind: `method`

Configures the PostgreSQL database used by Posta.

## Definition

```typescript
interface PostaResource {
  // ... omitted for brevity
  withPostgresReference(database: PostgresDatabaseResource): PostaResource;
}
```

## Signature

```typescript
withPostgresReference(database: PostgresDatabaseResource): PostaResource
```

## Parameters

- `database` (`PostgresDatabaseResource`)

## Returns

[PostaResource](/reference/api/typescript/communitytoolkit.aspire.hosting.posta/postaresource.md) `builder`

## Defined on

- [PostaResource](/reference/api/typescript/communitytoolkit.aspire.hosting.posta/postaresource.md) -- `handle`
