# PostgresServerResource.WithPassword

- Module: [Aspire.Hosting.PostgreSQL](/reference/api/go/aspire.hosting.postgresql.md)
- Defined on: [PostgresServerResource](/reference/api/go/aspire.hosting.postgresql/postgresserverresource.md)
- Version: `17.0.0`
- Kind: `method`

Configures the password that the PostgreSQL resource is used.

## Definition

```go
type PostgresServerResource interface {
    // ... omitted for brevity
    WithPassword(password ParameterResource) PostgresServerResource
}
```

## Signature

```go
WithPassword(password ParameterResource) PostgresServerResource
```

## Parameters

- `password` (`ParameterResource`) -- The parameter used to provide the password for the PostgreSQL resource.

## Returns

[`PostgresServerResource`](/reference/api/go/aspire.hosting.postgresql/postgresserverresource.md) -- The resource builder.

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

## Defined on

- [PostgresServerResource](/reference/api/go/aspire.hosting.postgresql/postgresserverresource.md) -- `handle`
