microsoft / microsoft/aspire.dev
[What's New Analysis] Document polyglot connection properties
Open
@sebastienros is already working on this.
Since Feb 11, 2026.
external feedback
- Dominant language
- MDX
- Stars
- 193
- Forks
- 87
- Avg merge
- 1d 22h
- Merged PRs (30d)
- 73
Description
Summary
Aspire 13.0 introduced polyglot-friendly connection properties for database resources, exposing multiple formats (URI, JDBC, individual properties). This is not documented in any database integration doc.
What's Missing
Connection Property Expressions
var postgres = builder.AddPostgres("db").AddDatabase("mydb");
// .NET uses standard connection strings
var dotnetApi = builder.AddProject<Projects.Api>()
.WithReference(postgres);
// Python uses URI format
var pythonWorker = builder.AddPythonModule("worker", "./worker", "worker.main")
.WithEnvironment("DATABASE_URL", postgres.Resource.UriExpression);
// Java uses JDBC format
var javaApp = builder.AddExecutable("java-app", ...)
.WithEnvironment("DB_JDBC", postgres.Resource.JdbcConnectionStringExpression);
Auto-exposed Environment Variables
When using WithReference(), these are automatically set:
DB_URI- PostgreSQL URI:postgresql://user:pass@host:port/dbnameDB_JDBCCONNECTIONSTRING- JDBC:jdbc:postgresql://host:port/dbnameDB_HOST,DB_PORT,DB_USERNAME,DB_PASSWORD,DB_DATABASENAME
Note: JDBC connection string excludes credentials for security.
Suggested Content
- Add to each database integration doc - PostgreSQL, MySQL, SQL Server, MongoDB, Oracle
- Property reference table - Which properties each resource type exposes
- Language-specific examples - Python, Java, Go usage patterns
- Security note - JDBC excludes credentials, use separate env vars
Why It Matters
This is THE key feature for polyglot development. Non-.NET developers need to know what environment variables are available.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.