From 175c67cefec1eb39e1379d26e35e659466b193b8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Ros?= Date: Mon, 20 Oct 2025 15:41:08 -0700 Subject: [PATCH 1/2] Introduce encoded parameters Updated environment variable keys for apiservice bindings to use a new naming convention. Add documentation for newly created encoded parameters --- docs/deployment/manifest-format.md | 27 +++++++++++++++++++++++---- 1 file changed, 23 insertions(+), 4 deletions(-) diff --git a/docs/deployment/manifest-format.md b/docs/deployment/manifest-format.md index 6fc40d16fc..a4c34a2a01 100644 --- a/docs/deployment/manifest-format.md +++ b/docs/deployment/manifest-format.md @@ -110,8 +110,8 @@ Publishing the manifest from the default starter template for Aspire produces th "OTEL_DOTNET_EXPERIMENTAL_OTLP_EMIT_EXCEPTION_LOG_ATTRIBUTES": "true", "OTEL_DOTNET_EXPERIMENTAL_OTLP_EMIT_EVENT_LOG_ATTRIBUTES": "true", "ConnectionStrings__cache": "{cache.connectionString}", - "services__apiservice__0": "{apiservice.bindings.http.url}", - "services__apiservice__1": "{apiservice.bindings.https.url}" + "services__apiservice__http__0": "{apiservice.bindings.http.url}", + "services__apiservice__https__0": "{apiservice.bindings.https.url}" }, "bindings": { "http": { @@ -142,8 +142,8 @@ This dependency is known because the environment variables for the _webfrontend_ "env": { // ... other environment variables omitted for clarity "ConnectionStrings__cache": "{cache.connectionString}", - "services__apiservice__0": "{apiservice.bindings.http.url}", - "services__apiservice__1": "{apiservice.bindings.https.url}" + "services__apiservice__http__0": "{apiservice.bindings.http.url}", + "services__apiservice__https__0": "{apiservice.bindings.https.url}" }, ``` @@ -228,6 +228,25 @@ The connection string placeholder references the `password` input parameter from The preceding JSON snippet shows the `inputs` field for a resource that has a `connectionString` field. The `password` input parameter is a string type and is marked as a secret. The `default` field is used to specify a default value for the input parameter. In this case, the default value is generated using the `generate` field, with random string of a minimum length. +When a parameter is using a formatter (for example `uri`), the manifest contains an additional resource that represents the formatted projection. + +- The resource type is `"annotated.string"`. +- `value` references the raw parameter value (`{parameter-name.value}`). +- `filter` names the formatter (e.g., `"uri"`, ...). +- The resource name is derived from the parameter name and format (`{parameter}-{format}-encoded`). Names are deduplicated if multiple projections share the same base. + +Example projection generated for a URI-encoded password: + +```json +"redis-password-uri-encoded": { + "type": "annotated.string", + "value": "{redis-password.value}", + "filter": "uri" +} +``` + +The original parameter remains in the manifest, preserving its secret metadata. Tools should apply the indicated `filter` when materializing the value. + ## Built-in resources The following table is a list of resource types that are explicitly generated by Aspire and From 7491bd30b51eb67adbcf160f16dd7f3e8735f7f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Ros?= Date: Mon, 20 Oct 2025 15:43:27 -0700 Subject: [PATCH 2/2] Update docs/deployment/manifest-format.md Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- docs/deployment/manifest-format.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/deployment/manifest-format.md b/docs/deployment/manifest-format.md index a4c34a2a01..9369675481 100644 --- a/docs/deployment/manifest-format.md +++ b/docs/deployment/manifest-format.md @@ -228,7 +228,7 @@ The connection string placeholder references the `password` input parameter from The preceding JSON snippet shows the `inputs` field for a resource that has a `connectionString` field. The `password` input parameter is a string type and is marked as a secret. The `default` field is used to specify a default value for the input parameter. In this case, the default value is generated using the `generate` field, with random string of a minimum length. -When a parameter is using a formatter (for example `uri`), the manifest contains an additional resource that represents the formatted projection. +When a parameter is using a filter (for example `uri`), the manifest contains an additional resource that represents the filtered projection. - The resource type is `"annotated.string"`. - `value` references the raw parameter value (`{parameter-name.value}`).