Skip to content

Support altering the default script for AzurePostgresFlexibleServer in .NET Aspire #9013

Open
@foxminchan

Description

@foxminchan

Is there an existing issue for this?

  • I have searched the existing issues

Is your feature request related to a problem? Please describe the problem.

Currently, the AddAzurePostgresFlexibleServer(...).AddDatabase(...).WithCreationScript(...) API works well, but it returns an IResourceBuilder<AzurePostgresFlexibleServerDatabaseResource> which is not compatible with PostgresDatabaseResource. This inconsistency makes it difficult to generalize database setup logic (e.g., if switching between local Postgres and Azure).

Screenshot of the error for reference:

Image

Image

Describe the solution you'd like

It would be helpful if:

  • There was a unified interface for database resources.
  • Or better guidance/docs/examples for using WithCreationScript in the AzurePostgresFlexibleServer scenario.

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-integrationsIssues pertaining to Aspire Integrations packagesazureIssues associated specifically with scenarios tied to using AzurepostgresIssues related to Postgres integrations

    Type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions