diff --git a/src/Aspire.Hosting.Azure.AIFoundry/AzureAIFoundryDeploymentResource.cs b/src/Aspire.Hosting.Azure.AIFoundry/AzureAIFoundryDeploymentResource.cs index c8544de647a..ecafdf82e0e 100644 --- a/src/Aspire.Hosting.Azure.AIFoundry/AzureAIFoundryDeploymentResource.cs +++ b/src/Aspire.Hosting.Azure.AIFoundry/AzureAIFoundryDeploymentResource.cs @@ -99,7 +99,7 @@ IEnumerable> IResourceWithConnectionSt { var model = Parent.IsEmulator ? ModelId ?? ModelName : DeploymentName; return Parent.CombineProperties([ - new("Model", ReferenceExpression.Create($"{model}")), + new("ModelName", ReferenceExpression.Create($"{model}")), new("Format", ReferenceExpression.Create($"{Format}")), new("Version", ReferenceExpression.Create($"{ModelVersion}")), ]); diff --git a/src/Aspire.Hosting.Azure.AIFoundry/README.md b/src/Aspire.Hosting.Azure.AIFoundry/README.md index d0753fd9e7a..06d21c4d144 100644 --- a/src/Aspire.Hosting.Azure.AIFoundry/README.md +++ b/src/Aspire.Hosting.Azure.AIFoundry/README.md @@ -98,11 +98,11 @@ The Azure AI Foundry deployment resource inherits all properties from its parent | Property Name | Description | |---------------|-------------| -| `Model` | The deployment name when targeting Azure or model identifier when running Foundry Local, e.g., `Phi-4`, `my-chat` | +| `ModelName` | The deployment name when targeting Azure or model identifier when running Foundry Local, e.g., `Phi-4`, `my-chat` | | `Format` | The deployment format, .e.g., `OpenAI`, `Microsoft`, `xAi`, `Deepseek` | | `Version` | The deployment version, e.g., `1`, `2025-08-07` | -Note: The property named `Model` refers to the deployment name when targeting Azure AI Foundry, but to the model identifier when running Foundry Local. +Note: The property named `ModelName` refers to the deployment name when targeting Azure AI Foundry, but to the model identifier when running Foundry Local. Aspire exposes each property as an environment variable named `[RESOURCE]_[PROPERTY]`. For instance, the `Uri` property of a resource called `chat` becomes `CHAT_URI`. diff --git a/src/Aspire.Hosting.Azure.CognitiveServices/AzureOpenAIDeploymentResource.cs b/src/Aspire.Hosting.Azure.CognitiveServices/AzureOpenAIDeploymentResource.cs index 8aa61636380..bf0ec866cc0 100644 --- a/src/Aspire.Hosting.Azure.CognitiveServices/AzureOpenAIDeploymentResource.cs +++ b/src/Aspire.Hosting.Azure.CognitiveServices/AzureOpenAIDeploymentResource.cs @@ -110,7 +110,7 @@ IEnumerable> IResourceWithConnectionSt yield return property; } - yield return new("Model", ReferenceExpression.Create($"{DeploymentName}")); + yield return new("ModelName", ReferenceExpression.Create($"{DeploymentName}")); } private static string ThrowIfNullOrEmpty([NotNull] string? argument, [CallerArgumentExpression(nameof(argument))] string? paramName = null) diff --git a/src/Aspire.Hosting.Azure.CognitiveServices/README.md b/src/Aspire.Hosting.Azure.CognitiveServices/README.md index 678e1a31803..5895e0613b7 100644 --- a/src/Aspire.Hosting.Azure.CognitiveServices/README.md +++ b/src/Aspire.Hosting.Azure.CognitiveServices/README.md @@ -71,7 +71,7 @@ The Azure OpenAI deployment resource inherits all properties from its parent Azu | Property Name | Description | |---------------|-------------| -| `Model` | The name of the Azure OpenAI deployment, e.g., `chat` | +| `ModelName` | The name of the Azure OpenAI deployment, e.g., `chat` | Aspire exposes each property as an environment variable named `[RESOURCE]_[PROPERTY]`. For instance, the `Uri` property of a resource called `chat` becomes `CHAT_URI`. diff --git a/src/Aspire.Hosting.Azure.CosmosDB/AzureCosmosDBDatabaseResource.cs b/src/Aspire.Hosting.Azure.CosmosDB/AzureCosmosDBDatabaseResource.cs index 93831166e43..a37fe3221b3 100644 --- a/src/Aspire.Hosting.Azure.CosmosDB/AzureCosmosDBDatabaseResource.cs +++ b/src/Aspire.Hosting.Azure.CosmosDB/AzureCosmosDBDatabaseResource.cs @@ -65,6 +65,6 @@ IEnumerable> IResourceWithConnectionSt yield return property; } - yield return new("Database", ReferenceExpression.Create($"{DatabaseName}")); + yield return new("DatabaseName", ReferenceExpression.Create($"{DatabaseName}")); } } diff --git a/src/Aspire.Hosting.Azure.CosmosDB/README.md b/src/Aspire.Hosting.Azure.CosmosDB/README.md index 1d9bfaf8f90..16f7000bea1 100644 --- a/src/Aspire.Hosting.Azure.CosmosDB/README.md +++ b/src/Aspire.Hosting.Azure.CosmosDB/README.md @@ -89,7 +89,7 @@ The Cosmos DB database resource inherits all properties from its parent Cosmos D | Property Name | Description | |---------------|-------------| -| `Database` | The name of the database | +| `DatabaseName` | The name of the database | ### Cosmos DB container diff --git a/src/Aspire.Hosting.Azure.EventHubs/AzureEventHubConsumerGroupResource.cs b/src/Aspire.Hosting.Azure.EventHubs/AzureEventHubConsumerGroupResource.cs index a186f0f2047..a91e0447513 100644 --- a/src/Aspire.Hosting.Azure.EventHubs/AzureEventHubConsumerGroupResource.cs +++ b/src/Aspire.Hosting.Azure.EventHubs/AzureEventHubConsumerGroupResource.cs @@ -74,6 +74,6 @@ IEnumerable> IResourceWithConnectionSt yield return property; } - yield return new("ConsumerGroup", ReferenceExpression.Create($"{ConsumerGroupName}")); + yield return new("ConsumerGroupName", ReferenceExpression.Create($"{ConsumerGroupName}")); } } diff --git a/src/Aspire.Hosting.Azure.EventHubs/README.md b/src/Aspire.Hosting.Azure.EventHubs/README.md index 728e9437fd1..67e5b582bd5 100644 --- a/src/Aspire.Hosting.Azure.EventHubs/README.md +++ b/src/Aspire.Hosting.Azure.EventHubs/README.md @@ -82,7 +82,7 @@ The Event Hub consumer group resource inherits all properties from its parent Ev | Property Name | Description | |---------------|-------------| -| `ConsumerGroup` | The name of the consumer group | +| `ConsumerGroupName` | The name of the consumer group | Aspire exposes each property as an environment variable named `[RESOURCE]_[PROPERTY]`. For instance, the `Uri` property of a resource called `db1` becomes `DB1_URI`. diff --git a/src/Aspire.Hosting.Azure.Kusto/AzureKustoReadWriteDatabaseResource.cs b/src/Aspire.Hosting.Azure.Kusto/AzureKustoReadWriteDatabaseResource.cs index 93fc25efadb..5aad2013418 100644 --- a/src/Aspire.Hosting.Azure.Kusto/AzureKustoReadWriteDatabaseResource.cs +++ b/src/Aspire.Hosting.Azure.Kusto/AzureKustoReadWriteDatabaseResource.cs @@ -75,6 +75,6 @@ IEnumerable> IResourceWithConnectionSt yield return property; } - yield return new("Database", ReferenceExpression.Create($"{DatabaseName}")); + yield return new("DatabaseName", ReferenceExpression.Create($"{DatabaseName}")); } -} \ No newline at end of file +} diff --git a/src/Aspire.Hosting.Azure.Kusto/README.md b/src/Aspire.Hosting.Azure.Kusto/README.md index 3569c259a73..cf8d470f99d 100644 --- a/src/Aspire.Hosting.Azure.Kusto/README.md +++ b/src/Aspire.Hosting.Azure.Kusto/README.md @@ -40,9 +40,9 @@ When you reference Azure Kusto resources using `WithReference`, the following co | Property Name | Description | |---------------|-------------| | `Uri` | The cluster endpoint URI (inherited from parent cluster) | -| `Database` | The name of the database | +| `DatabaseName` | The name of the database | -Aspire exposes each property as an environment variable named `[RESOURCE]_[PROPERTY]`. For instance, the `Uri` property of a resource called `mydb` becomes `MYDB_URI`, and the `Database` property becomes `MYDB_DATABASE`. +Aspire exposes each property as an environment variable named `[RESOURCE]_[PROPERTY]`. For instance, the `Uri` property of a resource called `mydb` becomes `MYDB_URI`, and the `DatabaseName` property becomes `MYDB_DATABASENAME`. ## Additional documentation diff --git a/src/Aspire.Hosting.Azure.PostgreSQL/AzurePostgresFlexibleServerDatabaseResource.cs b/src/Aspire.Hosting.Azure.PostgreSQL/AzurePostgresFlexibleServerDatabaseResource.cs index 057fb1afb80..3f45965b831 100644 --- a/src/Aspire.Hosting.Azure.PostgreSQL/AzurePostgresFlexibleServerDatabaseResource.cs +++ b/src/Aspire.Hosting.Azure.PostgreSQL/AzurePostgresFlexibleServerDatabaseResource.cs @@ -88,7 +88,7 @@ internal void SetInnerResource(PostgresDatabaseResource innerResource) IEnumerable> IResourceWithConnectionString.GetConnectionProperties() => Parent.CombineProperties([ - new("Database", ReferenceExpression.Create($"{DatabaseName}")), + new("DatabaseName", ReferenceExpression.Create($"{DatabaseName}")), new("Uri", UriExpression), new("JdbcConnectionString", JdbcConnectionString), ]); diff --git a/src/Aspire.Hosting.Azure.PostgreSQL/README.md b/src/Aspire.Hosting.Azure.PostgreSQL/README.md index 58b1801ea0f..4d9c15ac609 100644 --- a/src/Aspire.Hosting.Azure.PostgreSQL/README.md +++ b/src/Aspire.Hosting.Azure.PostgreSQL/README.md @@ -77,9 +77,9 @@ The Azure PostgreSQL database resource inherits all properties from its parent s | Property Name | Description | |---------------|-------------| -| `Database` | The name of the database | -| `Uri` | The database-specific connection URI, with the format `postgresql://{Username}:{Password}@{Host}/{Database}` (credentials omitted when not applicable) | -| `JdbcConnectionString` | JDBC-format connection string for the database, with the format `jdbc:postgresql://{Host}/{Database}?sslmode=require&authenticationPluginClassName=com.azure.identity.extensions.jdbc.postgresql.AzurePostgresqlAuthenticationPlugin` | +| `DatabaseName` | The name of the database | +| `Uri` | The database-specific connection URI, with the format `postgresql://{Username}:{Password}@{Host}/{DatabaseName}` (credentials omitted when not applicable) | +| `JdbcConnectionString` | JDBC-format connection string for the database, with the format `jdbc:postgresql://{Host}/{DatabaseName}?sslmode=require&authenticationPluginClassName=com.azure.identity.extensions.jdbc.postgresql.AzurePostgresqlAuthenticationPlugin` | Aspire exposes each property as an environment variable named `[RESOURCE]_[PROPERTY]`. For instance, the `Uri` property of a resource called `db1` becomes `DB1_URI`. diff --git a/src/Aspire.Hosting.Azure.Sql/AzureSqlDatabaseResource.cs b/src/Aspire.Hosting.Azure.Sql/AzureSqlDatabaseResource.cs index 51005e881b0..a19cad915a4 100644 --- a/src/Aspire.Hosting.Azure.Sql/AzureSqlDatabaseResource.cs +++ b/src/Aspire.Hosting.Azure.Sql/AzureSqlDatabaseResource.cs @@ -101,7 +101,7 @@ internal void SetInnerResource(SqlServerDatabaseResource innerResource) IEnumerable> IResourceWithConnectionString.GetConnectionProperties() => Parent.CombineProperties( [ - new ("Database", ReferenceExpression.Create($"{DatabaseName}")), + new ("DatabaseName", ReferenceExpression.Create($"{DatabaseName}")), new ("Uri", UriExpression), new ("JdbcConnectionString", JdbcConnectionString), ]); diff --git a/src/Aspire.Hosting.Azure.Sql/README.md b/src/Aspire.Hosting.Azure.Sql/README.md index 3bcc61f2415..1c7ff4f939c 100644 --- a/src/Aspire.Hosting.Azure.Sql/README.md +++ b/src/Aspire.Hosting.Azure.Sql/README.md @@ -75,7 +75,7 @@ The Azure SQL database resource inherits all properties from its parent Azure SQ | Property Name | Description | |---------------|-------------| -| `Database` | The name of the database | +| `DatabaseName` | The name of the database | | `Uri` | The connection URI, with the format `mssql://{Host}:{Port}/{DatabaseName}` | | `JdbcConnectionString` | JDBC connection string with the format `jdbc:sqlserver://{Host}:{Port};database={DatabaseName};encrypt=true;trustServerCertificate=false`; | diff --git a/src/Aspire.Hosting.GitHub.Models/GitHubModelResource.cs b/src/Aspire.Hosting.GitHub.Models/GitHubModelResource.cs index 28997c38404..bff3e7b0482 100644 --- a/src/Aspire.Hosting.GitHub.Models/GitHubModelResource.cs +++ b/src/Aspire.Hosting.GitHub.Models/GitHubModelResource.cs @@ -86,7 +86,7 @@ IEnumerable> IResourceWithConnectionSt { yield return new("Uri", UriExpression); yield return new("Key", ReferenceExpression.Create($"{Key}")); - yield return new("Model", ReferenceExpression.Create($"{Model}")); + yield return new("ModelName", ReferenceExpression.Create($"{Model}")); if (Organization is not null) { diff --git a/src/Aspire.Hosting.GitHub.Models/README.md b/src/Aspire.Hosting.GitHub.Models/README.md index d320cb1c40b..c14e14cffab 100644 --- a/src/Aspire.Hosting.GitHub.Models/README.md +++ b/src/Aspire.Hosting.GitHub.Models/README.md @@ -90,7 +90,7 @@ The GitHub Model resource exposes the following connection properties: |---------------|-------------| | `Uri` | The GitHub Models inference endpoint URI, with the format `https://models.github.ai/inference` | | `Key` | The API key (PAT or GitHub App token) for authentication | -| `Model` | The model identifier for inference requests, for instance `openai/gpt-4o-mini` | +| `ModelName` | The model identifier for inference requests, for instance `openai/gpt-4o-mini` | | `Organization` | The organization attributed to the request (available when configured) | Aspire exposes each property as an environment variable named `[RESOURCE]_[PROPERTY]`. For instance, the `Uri` property of a resource called `chat` becomes `CHAT_URI`. diff --git a/src/Aspire.Hosting.Milvus/MilvusDatabaseResource.cs b/src/Aspire.Hosting.Milvus/MilvusDatabaseResource.cs index 4341499f4ef..a5f37ae7f3b 100644 --- a/src/Aspire.Hosting.Milvus/MilvusDatabaseResource.cs +++ b/src/Aspire.Hosting.Milvus/MilvusDatabaseResource.cs @@ -42,6 +42,6 @@ private static string ThrowIfNullOrEmpty([NotNull] string? argument, [CallerArgu IEnumerable> IResourceWithConnectionString.GetConnectionProperties() => Parent.CombineProperties([ - new("Database", ReferenceExpression.Create($"{DatabaseName}")) + new("DatabaseName", ReferenceExpression.Create($"{DatabaseName}")) ]); } diff --git a/src/Aspire.Hosting.Milvus/README.md b/src/Aspire.Hosting.Milvus/README.md index 66f551e7e24..722c1a0d619 100644 --- a/src/Aspire.Hosting.Milvus/README.md +++ b/src/Aspire.Hosting.Milvus/README.md @@ -44,7 +44,7 @@ The Milvus database resource combines the server properties above and adds the f | Property Name | Description | |---------------|-------------| -| `Database` | The Milvus database name | +| `DatabaseName` | The Milvus database name | Aspire exposes each property as an environment variable named `[RESOURCE]_[PROPERTY]`. For instance, the `Uri` property of a resource called `db1` becomes `DB1_URI`. diff --git a/src/Aspire.Hosting.MongoDB/MongoDBDatabaseResource.cs b/src/Aspire.Hosting.MongoDB/MongoDBDatabaseResource.cs index ecd89ad22b3..77c0b6b0e2f 100644 --- a/src/Aspire.Hosting.MongoDB/MongoDBDatabaseResource.cs +++ b/src/Aspire.Hosting.MongoDB/MongoDBDatabaseResource.cs @@ -46,7 +46,7 @@ private static string ThrowIfNullOrEmpty([NotNull] string? argument, [CallerArgu IEnumerable> IResourceWithConnectionString.GetConnectionProperties() => Parent.CombineProperties([ - new("Database", ReferenceExpression.Create($"{DatabaseName}")), + new("DatabaseName", ReferenceExpression.Create($"{DatabaseName}")), new("Uri", UriExpression), ]); } diff --git a/src/Aspire.Hosting.MongoDB/README.md b/src/Aspire.Hosting.MongoDB/README.md index 622d8f89393..05db52ff519 100644 --- a/src/Aspire.Hosting.MongoDB/README.md +++ b/src/Aspire.Hosting.MongoDB/README.md @@ -47,7 +47,7 @@ The MongoDB database resource combines the server properties above and adds the | Property Name | Description | |---------------|-------------| -| `Database` | The MongoDB database name | +| `DatabaseName` | The MongoDB database name | Aspire exposes each property as an environment variable named `[RESOURCE]_[PROPERTY]`. For instance, the `Uri` property of a resource called `db1` becomes `DB1_URI`. diff --git a/src/Aspire.Hosting.MySql/MySqlDatabaseResource.cs b/src/Aspire.Hosting.MySql/MySqlDatabaseResource.cs index d36e29816ad..539dbad71b5 100644 --- a/src/Aspire.Hosting.MySql/MySqlDatabaseResource.cs +++ b/src/Aspire.Hosting.MySql/MySqlDatabaseResource.cs @@ -67,7 +67,7 @@ private static string ThrowIfNullOrEmpty([NotNull] string? argument, [CallerArgu IEnumerable> IResourceWithConnectionString.GetConnectionProperties() => Parent.CombineProperties([ - new("Database", ReferenceExpression.Create($"{DatabaseName}")), + new("DatabaseName", ReferenceExpression.Create($"{DatabaseName}")), new("Uri", UriExpression), new("JdbcConnectionString", JdbcConnectionString), ]); diff --git a/src/Aspire.Hosting.MySql/README.md b/src/Aspire.Hosting.MySql/README.md index 2c5c86403fb..b0691287897 100644 --- a/src/Aspire.Hosting.MySql/README.md +++ b/src/Aspire.Hosting.MySql/README.md @@ -46,9 +46,9 @@ The MySQL database resource combines the server properties above and adds the fo | Property Name | Description | |---------------|-------------| -| `Database` | The MySQL database name | -| `Uri` | The database-specific URI, with the format `mysql://root:{Password}@{Host}:{Port}/{Database}` | -| `JdbcConnectionString` | The database-specific JDBC connection string, with the format `jdbc:mysql://{Host}:{Port}/{Database}`. User and password credentials are provided as separate `Username` and `Password` properties. | +| `DatabaseName` | The MySQL database name | +| `Uri` | The database-specific URI, with the format `mysql://root:{Password}@{Host}:{Port}/{DatabaseName}` | +| `JdbcConnectionString` | The database-specific JDBC connection string, with the format `jdbc:mysql://{Host}:{Port}/{DatabaseName}`. User and password credentials are provided as separate `Username` and `Password` properties. | Aspire exposes each property as an environment variable named `[RESOURCE]_[PROPERTY]`. For instance, the `Uri` property of a resource called `db1` becomes `DB1_URI`. diff --git a/src/Aspire.Hosting.OpenAI/OpenAIModelResource.cs b/src/Aspire.Hosting.OpenAI/OpenAIModelResource.cs index a8b1408ee37..c77a2ef27d8 100644 --- a/src/Aspire.Hosting.OpenAI/OpenAIModelResource.cs +++ b/src/Aspire.Hosting.OpenAI/OpenAIModelResource.cs @@ -42,6 +42,6 @@ public OpenAIModelResource(string name, string model, OpenAIResource parent) : b IEnumerable> IResourceWithConnectionString.GetConnectionProperties() => Parent.CombineProperties([ - new("Model", ReferenceExpression.Create($"{Model}")), + new("ModelName", ReferenceExpression.Create($"{Model}")), ]); } diff --git a/src/Aspire.Hosting.OpenAI/README.md b/src/Aspire.Hosting.OpenAI/README.md index 02474568090..16d8406f5ac 100644 --- a/src/Aspire.Hosting.OpenAI/README.md +++ b/src/Aspire.Hosting.OpenAI/README.md @@ -138,7 +138,7 @@ The OpenAI model resource combines the parent properties above and adds the foll | Property Name | Description | |---------------|-------------| -| `Model` | The model identifier for inference requests, for instance `gpt-4o-mini` | +| `ModelName` | The model identifier for inference requests, for instance `gpt-4o-mini` | Aspire exposes each property as an environment variable named `[RESOURCE]_[PROPERTY]`. For instance, the `Uri` property of a resource called `chat` becomes `CHAT_URI`. diff --git a/src/Aspire.Hosting.Oracle/OracleDatabaseResource.cs b/src/Aspire.Hosting.Oracle/OracleDatabaseResource.cs index ac57c9c9d02..21a0735e0b4 100644 --- a/src/Aspire.Hosting.Oracle/OracleDatabaseResource.cs +++ b/src/Aspire.Hosting.Oracle/OracleDatabaseResource.cs @@ -56,7 +56,7 @@ private static string ThrowIfNullOrEmpty([NotNull] string? argument, [CallerArgu IEnumerable> IResourceWithConnectionString.GetConnectionProperties() => Parent.CombineProperties([ - new("Database", ReferenceExpression.Create($"{DatabaseName}")), + new("DatabaseName", ReferenceExpression.Create($"{DatabaseName}")), new("Uri", UriExpression), new("JdbcConnectionString", JdbcConnectionString), ]); diff --git a/src/Aspire.Hosting.Oracle/README.md b/src/Aspire.Hosting.Oracle/README.md index 7793f3a9977..05b4d322049 100644 --- a/src/Aspire.Hosting.Oracle/README.md +++ b/src/Aspire.Hosting.Oracle/README.md @@ -48,7 +48,7 @@ The Oracle database resource inherits all properties from its parent `OracleData |---------------|-------------| | `Uri` | The connection URI in oracle:// format, with the format `oracle://{Username}:{Password}@{Host}:{Port}/{DatabaseName}` | | `JdbcConnectionString` | JDBC connection string with database name, with the format `jdbc:oracle:thin:@//{Host}:{Port}/{DatabaseName}`. User and password credentials are provided as separate `Username` and `Password` properties. | -| `Database` | The name of the database | +| `DatabaseName` | The name of the database | Aspire exposes each property as an environment variable named `[RESOURCE]_[PROPERTY]`. For instance, the `Uri` property of a resource called `db1` becomes `DB1_URI`. diff --git a/src/Aspire.Hosting.PostgreSQL/PostgresDatabaseResource.cs b/src/Aspire.Hosting.PostgreSQL/PostgresDatabaseResource.cs index 52f97042179..a8567eade69 100644 --- a/src/Aspire.Hosting.PostgreSQL/PostgresDatabaseResource.cs +++ b/src/Aspire.Hosting.PostgreSQL/PostgresDatabaseResource.cs @@ -66,7 +66,7 @@ private static string ThrowIfNullOrEmpty([NotNull] string? argument, [CallerArgu IEnumerable> IResourceWithConnectionString.GetConnectionProperties() => Parent.CombineProperties([ - new("Database", ReferenceExpression.Create($"{DatabaseName}")), + new("DatabaseName", ReferenceExpression.Create($"{DatabaseName}")), new("Uri", UriExpression), new("JdbcConnectionString", JdbcConnectionString), ]); diff --git a/src/Aspire.Hosting.PostgreSQL/README.md b/src/Aspire.Hosting.PostgreSQL/README.md index fb2059d63c4..95555db2669 100644 --- a/src/Aspire.Hosting.PostgreSQL/README.md +++ b/src/Aspire.Hosting.PostgreSQL/README.md @@ -48,7 +48,7 @@ The PostgreSQL database resource inherits all properties from its parent `Postgr |---------------|-------------| | `Uri` | The connection URI with the database name, with the format `postgresql://{Username}:{Password}@{Host}:{Port}/{DatabaseName}` | | `JdbcConnectionString` | JDBC connection string with database name, with the format `jdbc:postgresql://{Host}:{Port}/{DatabaseName}`. User and password credentials are provided as separate `Username` and `Password` properties. | -| `Database` | The name of the database | +| `DatabaseName` | The name of the database | Aspire exposes each property as an environment variable named `[RESOURCE]_[PROPERTY]`. For instance, the `Uri` property of a resource called `db1` becomes `DB1_URI`. diff --git a/src/Aspire.Hosting.SqlServer/README.md b/src/Aspire.Hosting.SqlServer/README.md index 013fcad1188..8363e7be4cc 100644 --- a/src/Aspire.Hosting.SqlServer/README.md +++ b/src/Aspire.Hosting.SqlServer/README.md @@ -48,7 +48,7 @@ The SQL Server database resource inherits all properties from its parent `SqlSer |---------------|-------------| | `Uri` | The connection URI in mssql:// format, with the format `mssql://{Username}:{Password}@{Host}:{Port}/{DatabaseName}` | | `JdbcConnectionString` | JDBC connection string with database name, with the format `jdbc:sqlserver://{Host}:{Port};trustServerCertificate=true;databaseName={DatabaseName}`. User and password credentials are provided as separate `Username` and `Password` properties. | -| `Database` | The name of the database | +| `DatabaseName` | The name of the database | Aspire exposes each property as an environment variable named `[RESOURCE]_[PROPERTY]`. For instance, the `Uri` property of a resource called `db1` becomes `DB1_URI`. diff --git a/src/Aspire.Hosting.SqlServer/SqlServerDatabaseResource.cs b/src/Aspire.Hosting.SqlServer/SqlServerDatabaseResource.cs index 3b90b1f1810..c2c9c207ba4 100644 --- a/src/Aspire.Hosting.SqlServer/SqlServerDatabaseResource.cs +++ b/src/Aspire.Hosting.SqlServer/SqlServerDatabaseResource.cs @@ -68,7 +68,7 @@ private static string ThrowIfNullOrEmpty([NotNull] string? argument, [CallerArgu IEnumerable> IResourceWithConnectionString.GetConnectionProperties() => Parent.CombineProperties([ - new("Database", ReferenceExpression.Create($"{DatabaseName}")), + new("DatabaseName", ReferenceExpression.Create($"{DatabaseName}")), new("Uri", UriExpression), new("JdbcConnectionString", JdbcConnectionString), ]); diff --git a/tests/Aspire.Hosting.Azure.Kusto.Tests/AzureKustoConnectionPropertiesTests.cs b/tests/Aspire.Hosting.Azure.Kusto.Tests/AzureKustoConnectionPropertiesTests.cs index 9d2bc425f77..b6bf77d11fb 100644 --- a/tests/Aspire.Hosting.Azure.Kusto.Tests/AzureKustoConnectionPropertiesTests.cs +++ b/tests/Aspire.Hosting.Azure.Kusto.Tests/AzureKustoConnectionPropertiesTests.cs @@ -61,7 +61,7 @@ public void AzureKustoDatabaseResourceGetConnectionPropertiesReturnsExpectedValu }, property => { - Assert.Equal("Database", property.Key); + Assert.Equal("DatabaseName", property.Key); Assert.Equal("testdb", property.Value.ValueExpression); }); } @@ -85,7 +85,7 @@ public void AzureKustoDatabaseResourceWithEmulatorGetConnectionPropertiesReturns }, property => { - Assert.Equal("Database", property.Key); + Assert.Equal("DatabaseName", property.Key); Assert.Equal("testdb", property.Value.ValueExpression); }); } diff --git a/tests/Aspire.Hosting.Azure.Tests/AzureAIFoundryDeploymentConnectionPropertiesTests.cs b/tests/Aspire.Hosting.Azure.Tests/AzureAIFoundryDeploymentConnectionPropertiesTests.cs index 2bd5cc655c1..fb65125cc38 100644 --- a/tests/Aspire.Hosting.Azure.Tests/AzureAIFoundryDeploymentConnectionPropertiesTests.cs +++ b/tests/Aspire.Hosting.Azure.Tests/AzureAIFoundryDeploymentConnectionPropertiesTests.cs @@ -36,7 +36,7 @@ public void AzureAIFoundryDeploymentResourceGetConnectionPropertiesReturnsExpect }, property => { - Assert.Equal("Model", property.Key); + Assert.Equal("ModelName", property.Key); Assert.Equal(AIFoundryModel.Local.Phi4.Name, property.Value.ValueExpression); }, property => @@ -69,7 +69,7 @@ public void AzureAIFoundryDeploymentResourceGetConnectionPropertiesReturnsExpect }, property => { - Assert.Equal("Model", property.Key); + Assert.Equal("ModelName", property.Key); // Should be AIFoundryModel.Microsoft.Phi4.Format but assigned dynamically Assert.Equal("chat", property.Value.ValueExpression); }, diff --git a/tests/Aspire.Hosting.Azure.Tests/AzureCosmosDBContainerConnectionPropertiesTests.cs b/tests/Aspire.Hosting.Azure.Tests/AzureCosmosDBContainerConnectionPropertiesTests.cs index 3e5a7892ab6..621bc562c1a 100644 --- a/tests/Aspire.Hosting.Azure.Tests/AzureCosmosDBContainerConnectionPropertiesTests.cs +++ b/tests/Aspire.Hosting.Azure.Tests/AzureCosmosDBContainerConnectionPropertiesTests.cs @@ -28,7 +28,7 @@ public void AzureCosmosDBContainerResourceGetConnectionPropertiesReturnsExpected }, property => { - Assert.Equal("Database", property.Key); + Assert.Equal("DatabaseName", property.Key); Assert.Equal("mydb", property.Value.ValueExpression); }, property => @@ -68,7 +68,7 @@ public void AzureCosmosDBContainerResourceWithAccessKeyAuthenticationGetConnecti }, property => { - Assert.Equal("Database", property.Key); + Assert.Equal("DatabaseName", property.Key); Assert.Equal("mydb", property.Value.ValueExpression); }, property => @@ -108,7 +108,7 @@ public void AzureCosmosDBContainerResourceEmulatorGetConnectionPropertiesReturns }, property => { - Assert.Equal("Database", property.Key); + Assert.Equal("DatabaseName", property.Key); Assert.Equal("mydb", property.Value.ValueExpression); }, property => diff --git a/tests/Aspire.Hosting.Azure.Tests/AzureCosmosDBDatabaseConnectionPropertiesTests.cs b/tests/Aspire.Hosting.Azure.Tests/AzureCosmosDBDatabaseConnectionPropertiesTests.cs index 3303df3711d..fc8725d53ff 100644 --- a/tests/Aspire.Hosting.Azure.Tests/AzureCosmosDBDatabaseConnectionPropertiesTests.cs +++ b/tests/Aspire.Hosting.Azure.Tests/AzureCosmosDBDatabaseConnectionPropertiesTests.cs @@ -27,7 +27,7 @@ public void AzureCosmosDBDatabaseResourceGetConnectionPropertiesReturnsExpectedV }, property => { - Assert.Equal("Database", property.Key); + Assert.Equal("DatabaseName", property.Key); Assert.Equal("mydb", property.Value.ValueExpression); }); } @@ -61,7 +61,7 @@ public void AzureCosmosDBDatabaseResourceWithAccessKeyAuthenticationGetConnectio }, property => { - Assert.Equal("Database", property.Key); + Assert.Equal("DatabaseName", property.Key); Assert.Equal("mydb", property.Value.ValueExpression); }); } @@ -95,7 +95,7 @@ public void AzureCosmosDBDatabaseResourceEmulatorGetConnectionPropertiesReturnsE }, property => { - Assert.Equal("Database", property.Key); + Assert.Equal("DatabaseName", property.Key); Assert.Equal("mydb", property.Value.ValueExpression); }); } diff --git a/tests/Aspire.Hosting.Azure.Tests/AzureEventHubConsumerGroupConnectionPropertiesTests.cs b/tests/Aspire.Hosting.Azure.Tests/AzureEventHubConsumerGroupConnectionPropertiesTests.cs index 9283525a2b7..84a94b2ba4c 100644 --- a/tests/Aspire.Hosting.Azure.Tests/AzureEventHubConsumerGroupConnectionPropertiesTests.cs +++ b/tests/Aspire.Hosting.Azure.Tests/AzureEventHubConsumerGroupConnectionPropertiesTests.cs @@ -38,7 +38,7 @@ public void AzureEventHubConsumerGroupResourceGetConnectionPropertiesReturnsExpe }, property => { - Assert.Equal("ConsumerGroup", property.Key); + Assert.Equal("ConsumerGroupName", property.Key); Assert.Equal("mygroup", property.Value.ValueExpression); }); } diff --git a/tests/Aspire.Hosting.Azure.Tests/AzureOpenAIDeploymentConnectionPropertiesTests.cs b/tests/Aspire.Hosting.Azure.Tests/AzureOpenAIDeploymentConnectionPropertiesTests.cs index 0f4f436bdbb..293f8c5d7d1 100644 --- a/tests/Aspire.Hosting.Azure.Tests/AzureOpenAIDeploymentConnectionPropertiesTests.cs +++ b/tests/Aspire.Hosting.Azure.Tests/AzureOpenAIDeploymentConnectionPropertiesTests.cs @@ -27,7 +27,7 @@ public void AzureOpenAIDeploymentResourceGetConnectionPropertiesReturnsExpectedV }, property => { - Assert.Equal("Model", property.Key); + Assert.Equal("ModelName", property.Key); Assert.Equal("mydeployment", property.Value.ValueExpression); }); } diff --git a/tests/Aspire.Hosting.Azure.Tests/AzurePostgresFlexibleServerDatabaseConnectionPropertiesTests.cs b/tests/Aspire.Hosting.Azure.Tests/AzurePostgresFlexibleServerDatabaseConnectionPropertiesTests.cs index 3e5977fbe13..3ad7b4c7caa 100644 --- a/tests/Aspire.Hosting.Azure.Tests/AzurePostgresFlexibleServerDatabaseConnectionPropertiesTests.cs +++ b/tests/Aspire.Hosting.Azure.Tests/AzurePostgresFlexibleServerDatabaseConnectionPropertiesTests.cs @@ -22,7 +22,7 @@ public void AzurePostgresFlexibleServerDatabaseResourceGetConnectionPropertiesRe properties.OrderBy(p => p.Key), property => { - Assert.Equal("Database", property.Key); + Assert.Equal("DatabaseName", property.Key); Assert.Equal("mydb", property.Value.ValueExpression); }, property => @@ -61,7 +61,7 @@ public void AzurePostgresFlexibleServerDatabaseResourceWithPasswordAuthenticatio properties.OrderBy(p => p.Key), property => { - Assert.Equal("Database", property.Key); + Assert.Equal("DatabaseName", property.Key); Assert.Equal("mydb", property.Value.ValueExpression); }, property => diff --git a/tests/Aspire.Hosting.Azure.Tests/AzureSqlDatabaseConnectionPropertiesTests.cs b/tests/Aspire.Hosting.Azure.Tests/AzureSqlDatabaseConnectionPropertiesTests.cs index 259bc2a610c..2d25bbfdd73 100644 --- a/tests/Aspire.Hosting.Azure.Tests/AzureSqlDatabaseConnectionPropertiesTests.cs +++ b/tests/Aspire.Hosting.Azure.Tests/AzureSqlDatabaseConnectionPropertiesTests.cs @@ -22,7 +22,7 @@ public void AzureSqlDatabaseResourceGetConnectionPropertiesReturnsExpectedValues properties.OrderBy(p => p.Key), property => { - Assert.Equal("Database", property.Key); + Assert.Equal("DatabaseName", property.Key); Assert.Equal("mydb", property.Value.ValueExpression); }, property => diff --git a/tests/Aspire.Hosting.Azure.Tests/Snapshots/AzureContainerAppsTests.ProjectWithManyReferenceTypes#00.verified.bicep b/tests/Aspire.Hosting.Azure.Tests/Snapshots/AzureContainerAppsTests.ProjectWithManyReferenceTypes#00.verified.bicep index 787ad4d4813..878817c165c 100644 --- a/tests/Aspire.Hosting.Azure.Tests/Snapshots/AzureContainerAppsTests.ProjectWithManyReferenceTypes#00.verified.bicep +++ b/tests/Aspire.Hosting.Azure.Tests/Snapshots/AzureContainerAppsTests.ProjectWithManyReferenceTypes#00.verified.bicep @@ -186,7 +186,7 @@ resource api 'Microsoft.App/containerApps@2025-02-02-preview' = { secretRef: 'db-password' } { - name: 'DB_DATABASE' + name: 'DB_DATABASENAME' value: 'db' } { @@ -268,4 +268,4 @@ resource api 'Microsoft.App/containerApps@2025-02-02-preview' = { '${env_outputs_azure_container_registry_managed_identity_id}': { } } } -} \ No newline at end of file +} diff --git a/tests/Aspire.Hosting.Azure.Tests/Snapshots/AzureContainerAppsTests.ProjectWithManyReferenceTypesAndContainerAppEnvironment#00.verified.bicep b/tests/Aspire.Hosting.Azure.Tests/Snapshots/AzureContainerAppsTests.ProjectWithManyReferenceTypesAndContainerAppEnvironment#00.verified.bicep index 37f80ea7ef9..af3c56a0d0f 100644 --- a/tests/Aspire.Hosting.Azure.Tests/Snapshots/AzureContainerAppsTests.ProjectWithManyReferenceTypesAndContainerAppEnvironment#00.verified.bicep +++ b/tests/Aspire.Hosting.Azure.Tests/Snapshots/AzureContainerAppsTests.ProjectWithManyReferenceTypesAndContainerAppEnvironment#00.verified.bicep @@ -179,7 +179,7 @@ resource api 'Microsoft.App/containerApps@2025-02-02-preview' = { secretRef: 'db-password' } { - name: 'DB_DATABASE' + name: 'DB_DATABASENAME' value: 'db' } { @@ -257,4 +257,4 @@ resource api 'Microsoft.App/containerApps@2025-02-02-preview' = { '${cae_outputs_azure_container_registry_managed_identity_id}': { } } } -} \ No newline at end of file +} diff --git a/tests/Aspire.Hosting.GitHub.Models.Tests/ConnectionPropertiesTests.cs b/tests/Aspire.Hosting.GitHub.Models.Tests/ConnectionPropertiesTests.cs index 41f4b28873a..e4e6fadfa5a 100644 --- a/tests/Aspire.Hosting.GitHub.Models.Tests/ConnectionPropertiesTests.cs +++ b/tests/Aspire.Hosting.GitHub.Models.Tests/ConnectionPropertiesTests.cs @@ -29,7 +29,7 @@ public void GitHubModelResourceGetConnectionPropertiesReturnsExpectedValues() }, property => { - Assert.Equal("Model", property.Key); + Assert.Equal("ModelName", property.Key); Assert.Equal("gpt", property.Value.ValueExpression); }); @@ -40,14 +40,14 @@ public void GitHubModelResourceGetConnectionPropertiesReturnsExpectedValues() public void GitHubModelResourceGetConnectionPropertiesIncludesOrganizationWhenProvided() { var organization = new ParameterResource("org", _ => "dotnet"); - var key = new ParameterResource("key", _ => "p@ssw0rd1", secret: true); + var key = new ParameterResource("key", _ => "p@ssw0rd1", secret: true); var resource = new GitHubModelResource("model", "gpt", organization, key); var properties = ((IResourceWithConnectionString)resource).GetConnectionProperties().ToArray(); Assert.Contains(properties, property => property.Key == "Uri" && property.Value.ValueExpression == "https://models.github.ai/orgs/{org.value}/inference"); Assert.Contains(properties, property => property.Key == "Key" && property.Value.ValueExpression == "{key.value}"); - Assert.Contains(properties, property => property.Key == "Model" && property.Value.ValueExpression == "gpt"); + Assert.Contains(properties, property => property.Key == "ModelName" && property.Value.ValueExpression == "gpt"); Assert.Contains(properties, property => property.Key == "Organization" && property.Value.ValueExpression == "{org.value}"); } -} \ No newline at end of file +} diff --git a/tests/Aspire.Hosting.Milvus.Tests/ConnectionPropertiesTests.cs b/tests/Aspire.Hosting.Milvus.Tests/ConnectionPropertiesTests.cs index 968a259aa95..b56fa607ead 100644 --- a/tests/Aspire.Hosting.Milvus.Tests/ConnectionPropertiesTests.cs +++ b/tests/Aspire.Hosting.Milvus.Tests/ConnectionPropertiesTests.cs @@ -52,6 +52,6 @@ public void MilvusDatabaseResourceGetConnectionPropertiesIncludesDatabaseSpecifi Assert.Contains(properties, property => property.Key == "Port" && property.Value.ValueExpression == "{milvus.bindings.grpc.port}"); Assert.Contains(properties, property => property.Key == "Token" && property.Value.ValueExpression == "root:{apiKey.value}"); Assert.Contains(properties, property => property.Key == "Uri" && property.Value.ValueExpression == "{milvus.bindings.grpc.url}"); - Assert.Contains(properties, property => property.Key == "Database" && property.Value.ValueExpression == "Vectors"); + Assert.Contains(properties, property => property.Key == "DatabaseName" && property.Value.ValueExpression == "Vectors"); } -} \ No newline at end of file +} diff --git a/tests/Aspire.Hosting.MongoDB.Tests/ConnectionPropertiesTests.cs b/tests/Aspire.Hosting.MongoDB.Tests/ConnectionPropertiesTests.cs index fecd3c8923f..602a9b184e8 100644 --- a/tests/Aspire.Hosting.MongoDB.Tests/ConnectionPropertiesTests.cs +++ b/tests/Aspire.Hosting.MongoDB.Tests/ConnectionPropertiesTests.cs @@ -72,7 +72,7 @@ public void MongoDbDatabaseResourceGetConnectionPropertiesIncludesDatabaseSpecif Assert.Contains(properties, property => property.Key == "Password" && property.Value.ValueExpression == "{password.value}"); Assert.Contains(properties, property => property.Key == "AuthenticationDatabase" && property.Value.ValueExpression == "admin"); Assert.Contains(properties, property => property.Key == "AuthenticationMechanism" && property.Value.ValueExpression == "SCRAM-SHA-256"); - Assert.Contains(properties, property => property.Key == "Database" && property.Value.ValueExpression == "Products"); + Assert.Contains(properties, property => property.Key == "DatabaseName" && property.Value.ValueExpression == "Products"); Assert.Contains( properties, property => property.Key == "Uri" && @@ -106,4 +106,4 @@ public async Task VerifyManifestWithConnectionProperties() await Verify(manifest.ToString(), "json"); } -} \ No newline at end of file +} diff --git a/tests/Aspire.Hosting.MongoDB.Tests/Snapshots/ConnectionPropertiesTests.VerifyManifestWithConnectionProperties.verified.json b/tests/Aspire.Hosting.MongoDB.Tests/Snapshots/ConnectionPropertiesTests.VerifyManifestWithConnectionProperties.verified.json index 46070d63072..c94ff9453b2 100644 --- a/tests/Aspire.Hosting.MongoDB.Tests/Snapshots/ConnectionPropertiesTests.VerifyManifestWithConnectionProperties.verified.json +++ b/tests/Aspire.Hosting.MongoDB.Tests/Snapshots/ConnectionPropertiesTests.VerifyManifestWithConnectionProperties.verified.json @@ -1,4 +1,4 @@ -{ +{ "type": "executable.v0", "workingDirectory": ".", "command": "command", @@ -19,7 +19,7 @@ "DB_AUTHENTICATIONDATABASE": "admin", "DB_AUTHENTICATIONMECHANISM": "SCRAM-SHA-256", "DB_URI": "mongodb://admin:{server-password-uri-encoded.value}@{server.bindings.tcp.host}:{server.bindings.tcp.port}/db%23test?authSource=admin\u0026authMechanism=SCRAM-SHA-256", - "DB_DATABASE": "db#test", + "DB_DATABASENAME": "db#test", "ConnectionStrings__serverWithParameters": "{serverWithParameters.connectionString}", "SERVERWITHPARAMETERS_HOST": "{serverWithParameters.bindings.tcp.host}", "SERVERWITHPARAMETERS_PORT": "{serverWithParameters.bindings.tcp.port}", @@ -36,6 +36,6 @@ "DBWITHPARAMETERS_AUTHENTICATIONDATABASE": "admin", "DBWITHPARAMETERS_AUTHENTICATIONMECHANISM": "SCRAM-SHA-256", "DBWITHPARAMETERS_URI": "mongodb://{username-uri-encoded.value}:{password-uri-encoded.value}@{serverWithParameters.bindings.tcp.host}:{serverWithParameters.bindings.tcp.port}/db%23test?authSource=admin\u0026authMechanism=SCRAM-SHA-256", - "DBWITHPARAMETERS_DATABASE": "db#test" + "DBWITHPARAMETERS_DATABASENAME": "db#test" } -} \ No newline at end of file +} diff --git a/tests/Aspire.Hosting.MySql.Tests/ConnectionPropertiesTests.cs b/tests/Aspire.Hosting.MySql.Tests/ConnectionPropertiesTests.cs index 654c230b8c4..0e4a7ee47e8 100644 --- a/tests/Aspire.Hosting.MySql.Tests/ConnectionPropertiesTests.cs +++ b/tests/Aspire.Hosting.MySql.Tests/ConnectionPropertiesTests.cs @@ -63,7 +63,7 @@ public void MySqlDatabaseResourceGetConnectionPropertiesIncludesDatabaseSpecific Assert.Contains(properties, property => property.Key == "Port" && property.Value.ValueExpression == "{mysql.bindings.tcp.port}"); Assert.Contains(properties, property => property.Key == "Username" && property.Value.ValueExpression == "root"); Assert.Contains(properties, property => property.Key == "Password" && property.Value.ValueExpression == "{password.value}"); - Assert.Contains(properties, property => property.Key == "Database" && property.Value.ValueExpression == "Orders"); + Assert.Contains(properties, property => property.Key == "DatabaseName" && property.Value.ValueExpression == "Orders"); Assert.Contains( properties, property => property.Key == "Uri" && @@ -93,4 +93,4 @@ public async Task VerifyManifestWithConnectionProperties() await Verify(manifest.ToString(), "json"); } -} \ No newline at end of file +} diff --git a/tests/Aspire.Hosting.MySql.Tests/Snapshots/ConnectionPropertiesTests.VerifyManifestWithConnectionProperties.verified.json b/tests/Aspire.Hosting.MySql.Tests/Snapshots/ConnectionPropertiesTests.VerifyManifestWithConnectionProperties.verified.json index 83a2dcbd58f..37c4c393d1b 100644 --- a/tests/Aspire.Hosting.MySql.Tests/Snapshots/ConnectionPropertiesTests.VerifyManifestWithConnectionProperties.verified.json +++ b/tests/Aspire.Hosting.MySql.Tests/Snapshots/ConnectionPropertiesTests.VerifyManifestWithConnectionProperties.verified.json @@ -17,6 +17,6 @@ "DB_PASSWORD": "{server-password.value}", "DB_URI": "mysql://root:{server-password-uri-encoded.value}@{server.bindings.tcp.host}:{server.bindings.tcp.port}/db%23test", "DB_JDBCCONNECTIONSTRING": "jdbc:mysql://{server.bindings.tcp.host}:{server.bindings.tcp.port}/db%23test", - "DB_DATABASE": "db#test" + "DB_DATABASENAME": "db#test" } } \ No newline at end of file diff --git a/tests/Aspire.Hosting.OpenAI.Tests/ConnectionPropertiesTests.cs b/tests/Aspire.Hosting.OpenAI.Tests/ConnectionPropertiesTests.cs index b7e972cdd5e..c047dace01f 100644 --- a/tests/Aspire.Hosting.OpenAI.Tests/ConnectionPropertiesTests.cs +++ b/tests/Aspire.Hosting.OpenAI.Tests/ConnectionPropertiesTests.cs @@ -52,6 +52,6 @@ public void OpenAiModelResourceGetConnectionPropertiesIncludesModel() Assert.Contains(properties, property => property.Key == "Endpoint" && property.Value.ValueExpression == "https://contoso.ai/v1"); Assert.Contains(properties, property => property.Key == "Uri" && property.Value.ValueExpression == "https://contoso.ai/v1"); Assert.Contains(properties, property => property.Key == "Key" && property.Value.ValueExpression == "{key.value}"); - Assert.Contains(properties, property => property.Key == "Model" && property.Value.ValueExpression == "gpt-4o-mini"); + Assert.Contains(properties, property => property.Key == "ModelName" && property.Value.ValueExpression == "gpt-4o-mini"); } -} \ No newline at end of file +} diff --git a/tests/Aspire.Hosting.Oracle.Tests/ConnectionPropertiesTests.cs b/tests/Aspire.Hosting.Oracle.Tests/ConnectionPropertiesTests.cs index ea9f61df79a..662751049cc 100644 --- a/tests/Aspire.Hosting.Oracle.Tests/ConnectionPropertiesTests.cs +++ b/tests/Aspire.Hosting.Oracle.Tests/ConnectionPropertiesTests.cs @@ -63,7 +63,7 @@ public void OracleDatabaseResourceGetConnectionPropertiesIncludesDatabaseSpecifi Assert.Contains(properties, property => property.Key == "Port" && property.Value.ValueExpression == "{oracle.bindings.tcp.port}"); Assert.Contains(properties, property => property.Key == "Username" && property.Value.ValueExpression == "system"); Assert.Contains(properties, property => property.Key == "Password" && property.Value.ValueExpression == "{password.value}"); - Assert.Contains(properties, property => property.Key == "Database" && property.Value.ValueExpression == "Orders"); + Assert.Contains(properties, property => property.Key == "DatabaseName" && property.Value.ValueExpression == "Orders"); Assert.Contains( properties, property => property.Key == "JdbcConnectionString" && @@ -90,4 +90,4 @@ public async Task VerifyManifestWithConnectionProperties() await Verify(oracleManifest.ToString(), "json"); } -} \ No newline at end of file +} diff --git a/tests/Aspire.Hosting.Oracle.Tests/Snapshots/ConnectionPropertiesTests.VerifyManifestWithConnectionProperties.verified.json b/tests/Aspire.Hosting.Oracle.Tests/Snapshots/ConnectionPropertiesTests.VerifyManifestWithConnectionProperties.verified.json index 1597c3bad46..f17ee6576ef 100644 --- a/tests/Aspire.Hosting.Oracle.Tests/Snapshots/ConnectionPropertiesTests.VerifyManifestWithConnectionProperties.verified.json +++ b/tests/Aspire.Hosting.Oracle.Tests/Snapshots/ConnectionPropertiesTests.VerifyManifestWithConnectionProperties.verified.json @@ -17,6 +17,6 @@ "DB_PASSWORD": "{server-password.value}", "DB_URI": "oracle://system:{server-password-uri-encoded.value}@{server.bindings.tcp.host}:{server.bindings.tcp.port}/db%23test", "DB_JDBCCONNECTIONSTRING": "jdbc:oracle:thin:@//{server.bindings.tcp.host}:{server.bindings.tcp.port}/db%23test", - "DB_DATABASE": "db#test" + "DB_DATABASENAME": "db#test" } } \ No newline at end of file diff --git a/tests/Aspire.Hosting.PostgreSQL.Tests/ConnectionPropertiesTests.cs b/tests/Aspire.Hosting.PostgreSQL.Tests/ConnectionPropertiesTests.cs index 9f0467738c4..86b72bf7955 100644 --- a/tests/Aspire.Hosting.PostgreSQL.Tests/ConnectionPropertiesTests.cs +++ b/tests/Aspire.Hosting.PostgreSQL.Tests/ConnectionPropertiesTests.cs @@ -64,7 +64,7 @@ public void PostgresDatabaseResourceGetConnectionPropertiesIncludesDatabaseSpeci Assert.Contains(properties, property => property.Key == "Port" && property.Value.ValueExpression == "{postgres.bindings.tcp.port}"); Assert.Contains(properties, property => property.Key == "Username" && property.Value.ValueExpression == "{user.value}"); Assert.Contains(properties, property => property.Key == "Password" && property.Value.ValueExpression == "{password.value}"); - Assert.Contains(properties, property => property.Key == "Database" && property.Value.ValueExpression == "Customers"); + Assert.Contains(properties, property => property.Key == "DatabaseName" && property.Value.ValueExpression == "Customers"); Assert.Contains( properties, property => property.Key == "Uri" && diff --git a/tests/Aspire.Hosting.SqlServer.Tests/ConnectionPropertiesTests.cs b/tests/Aspire.Hosting.SqlServer.Tests/ConnectionPropertiesTests.cs index 072303b893e..8d10837b0ce 100644 --- a/tests/Aspire.Hosting.SqlServer.Tests/ConnectionPropertiesTests.cs +++ b/tests/Aspire.Hosting.SqlServer.Tests/ConnectionPropertiesTests.cs @@ -62,7 +62,7 @@ public void SqlServerDatabaseResourceGetConnectionPropertiesIncludesDatabaseSpec Assert.Contains(properties, property => property.Key == "Port" && property.Value.ValueExpression == "{sql.bindings.tcp.port}"); Assert.Contains(properties, property => property.Key == "Username" && property.Value.ValueExpression == "sa"); Assert.Contains(properties, property => property.Key == "Password" && property.Value.ValueExpression == "{password.value}"); - Assert.Contains(properties, property => property.Key == "Database" && property.Value.ValueExpression == "Orders"); + Assert.Contains(properties, property => property.Key == "DatabaseName" && property.Value.ValueExpression == "Orders"); Assert.Contains(properties, property => property.Key == "Uri" && property.Value.ValueExpression == "mssql://sa:{password.value}@{sql.bindings.tcp.host}:{sql.bindings.tcp.port}/Orders"); Assert.Contains( diff --git a/tests/Aspire.Hosting.Tests/ManifestGenerationTests.cs b/tests/Aspire.Hosting.Tests/ManifestGenerationTests.cs index b1d525273d1..aadbbc9b6e6 100644 --- a/tests/Aspire.Hosting.Tests/ManifestGenerationTests.cs +++ b/tests/Aspire.Hosting.Tests/ManifestGenerationTests.cs @@ -399,7 +399,7 @@ public void VerifyTestProgramFullManifest() "POSTGRESDB_PASSWORD": "{postgres-password.value}", "POSTGRESDB_URI": "postgresql://postgres:{postgres-password-uri-encoded.value}@{postgres.bindings.tcp.host}:{postgres.bindings.tcp.port}/postgresdb", "POSTGRESDB_JDBCCONNECTIONSTRING": "jdbc:postgresql://{postgres.bindings.tcp.host}:{postgres.bindings.tcp.port}/postgresdb", - "POSTGRESDB_DATABASE": "postgresdb" + "POSTGRESDB_DATABASENAME": "postgresdb" }, "bindings": { "http": {