Docs: replace non-Azure AsExisting examples with AddConnectionString#1076
Docs: replace non-Azure AsExisting examples with AddConnectionString#1076IEvangelist wants to merge 4 commits into
Conversation
Switch non-Azure existing-instance docs from AsExisting guidance to AddConnectionString modeling in Redis, Garnet, Valkey, RabbitMQ, Elasticsearch, and glossary patterns.\n\nCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Updates Aspire integration docs to stop recommending non-existent/non-exposed AsExisting(...) patterns for non-Azure resources, replacing them with connection-string based modeling to address issue #1074.
Changes:
- Replace C#
AddX(...).AsExisting(...)examples withAddConnectionString(...)across several integration Host docs. - Replace TypeScript explanatory text with concrete
addConnectionString(...)+withReference(...)examples. - Update the glossary “Existing resource pattern” snippet to use
AddConnectionString(...).
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| src/frontend/src/content/docs/integrations/caching/redis/redis-host.mdx | Switch existing-Redis example to connection-string resource; adds TS code sample. |
| src/frontend/src/content/docs/integrations/caching/garnet/garnet-host.mdx | Switch existing-Garnet example to connection-string resource; adds TS code sample. |
| src/frontend/src/content/docs/integrations/caching/valkey/valkey-host.mdx | Switch existing-Valkey example to connection-string resource; adds TS code sample. |
| src/frontend/src/content/docs/integrations/messaging/rabbitmq/rabbitmq-host.mdx | Switch existing-RabbitMQ example to connection-string resource; adds TS code sample. |
| src/frontend/src/content/docs/integrations/databases/elasticsearch/elasticsearch-host.mdx | Switch existing-Elasticsearch example to connection-string resource; adds TS code sample. |
| src/frontend/src/content/docs/get-started/glossary.mdx | Update “Existing resource pattern” snippet to use AddConnectionString(...). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Add explicit notes that AddConnectionString/addConnectionString resolve from ConnectionStrings configuration and inject connection-string values, not typed resource connection-property variables.\n\nCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
Addressed the Copilot review feedback in b51f231:
|
|
I'm wondering whether it might be a more meaningful story if we show using AddGarnet locally and switching to AddConnectionString for deployment? The thing we need to figure out there is the differences in how the strings are handled because we won't deconstruct a connection string into REDIS_HOST and the like. |
Call out that ConnectionStrings__{name} is passed through as a single connection string value and is not deconstructed into resource connection-property variables.\n\nCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
Follow-up update in bfca595: I strengthened the wording in each affected section to explicitly call out format behavior:
|
Document when resource connection properties are available and when AddConnectionString/addConnectionString provides only a single ConnectionStrings value that is not deconstructed.\n\nCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
Expanded scope in 02ec0e7 to the corresponding Each now explicitly documents the distinction:
|
Summary
This PR fixes the docs guidance behind #1074 by removing non-Azure
AsExisting(...)examples that don't match available APIs.The updated guidance now models existing external resources with
AddConnectionString(...)/addConnectionString(...)instead.What changed
AsExisting(connectionStringParameter: ...).AddConnectionString/addConnectionString.ConnectionStrings:<name>/ConnectionStrings__<name>.Files updated
src/frontend/src/content/docs/integrations/caching/redis/redis-host.mdxsrc/frontend/src/content/docs/integrations/caching/garnet/garnet-host.mdxsrc/frontend/src/content/docs/integrations/caching/valkey/valkey-host.mdxsrc/frontend/src/content/docs/integrations/messaging/rabbitmq/rabbitmq-host.mdxsrc/frontend/src/content/docs/integrations/databases/elasticsearch/elasticsearch-host.mdxsrc/frontend/src/content/docs/get-started/glossary.mdxFixes #1074