Support altering the default script for AzurePostgresFlexibleServer in .NET Aspire
- Dominant language
- C#
- Stars
- 6.3k
- Forks
- 991
- Avg merge
- 2d 15h
- Merged PRs (30d)
- 196
Description
### Is there an existing issue for this?
- [x] 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` 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:**


### 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_
Contributor guide
Assessment
This issue has not been assessed yet.