# ZitadelResource

- Module: [CommunityToolkit.Aspire.Hosting.Zitadel](/reference/api/typescript/communitytoolkit.aspire.hosting.zitadel.md)
- Version: `13.4.0`
- Kind: `handle`
- Source: [GitHub](https://github.com/CommunityToolkit/Aspire)

## Definition

```typescript
interface ZitadelResource
  extends IComputeResource,
    IResource,
    IResourceWithArgs,
    IResourceWithEndpoints,
    IResourceWithEnvironment,
    IResourceWithProbes,
    IResourceWithWaitSupport {
  withDatabase(
      server: PostgresServerResource,
      databaseName?: string): ZitadelResource;
  withExistingDatabase(database: PostgresDatabaseResource): ZitadelResource;
  withExternalDomain(externalDomain: string): ZitadelResource;
}
```

## Methods

- [withDatabase](/reference/api/typescript/communitytoolkit.aspire.hosting.zitadel/zitadelresource/withdatabase.md) -- `method` -- Adds database support to the Zitadel resource.
    ```typescript
  withDatabase(server: PostgresServerResource, databaseName?: string): ZitadelResource
  ```
- [withExistingDatabase](/reference/api/typescript/communitytoolkit.aspire.hosting.zitadel/zitadelresource/withexistingdatabase.md) -- `method` -- Adds database support to the Zitadel resource.
    ```typescript
  withExistingDatabase(database: PostgresDatabaseResource): ZitadelResource
  ```
- [withExternalDomain](/reference/api/typescript/communitytoolkit.aspire.hosting.zitadel/zitadelresource/withexternaldomain.md) -- `method` -- Configures the external domain for the Zitadel resource
    ```typescript
  withExternalDomain(externalDomain: string): ZitadelResource
  ```
