Skip to content

Redis: Add an existing Redis instance Not Found Method AsExisting #1074

Closed

Description

@MemorySum

Is there an existing issue for this?

  • I have searched the existing issues

Describe the bug

Image I want to link an existing Redis instance in Aspire, and I found an AsExisting method in [Connect to an existing Redis instance](https://aspire.dev/integrations/caching/redis/redis-host/#connect-to-an-existing-redis-instance) it, but I didn't find it in the code

my project's package version :
sdk: Net 10.0
aspire.hosting.redis\13.3.5
aspire.hosting.apphost\13.3.5

Image

Expected Behavior

I want to connect to existing Redis instances normally and use the AsExisting method

Steps To Reproduce

No response

Exceptions (if any)

No response

Aspire doctor output

No response

Anything else?

No response

Activity

  1. joperezr commented on May 26, 2026

    @joperezr
    Member
    🤖 Aspire triage pass — 2026-05-26 15:10 UTC

    Area: area-integrations
    Kind: bug (possible docs/API mismatch)
    Repro: partial — reporter cites Aspire.Hosting.Redis 13.3.5 and a docs page describing an AsExisting method they cannot find on the non-Azure Redis builder
    Affected version(s): 13.3.5
    Severity: S3 — workaround likely exists via connection-string–based wiring; affects discoverability of a documented API

    Urgency: ⚪ backlog — no milestone
    Reason: not a regression, no data-loss/outage signal, no blocked partner; needs human to decide whether this is a docs fix or a missing API on Aspire.Hosting.Redis.

    Suggested owner(s): Eric Erhardt (@eerhardt) (score ~4), backup Sébastien Ros (@sebastienros) (score ~3)
    Evidence:

    Confidence: medium
    Needs human?: yes — confirm whether AsExisting is intended to exist on the non-Azure IResourceBuilder<RedisResource> or whether the docs page (aspire.dev/integrations/caching/redis/redis-host) describes Azure-only behavior.

    Dry-run mode — no labels or milestone applied. Reply /triage apply to promote, or edit and reapply.

  2. davidfowl commented on May 26, 2026

    @davidfowl
    Contributor

    Yea this doc looks like slop 😄. AsExsiting is only for azure resources.

  3. IEvangelist commented on Jun 2, 2026

    @IEvangelist
    Member

    Triage → @Copilot

    Confirmed root cause (per David Fowler (@davidfowl) in this thread): AsExisting is an Azure-only API. The non-Azure integration docs that show AsExisting examples are wrong — those methods don't exist on the corresponding IResourceBuilder<...> extensions. This also affects #1092 (same bug, RabbitMQ).

    Scope

    1. Audit every non-Azure integration page under src/frontend/src/content/docs/integrations/ for sections titled "Connect to an existing X instance" (and any other place that calls AsExisting(...) outside the cloud/azure/ subtree). Start by grepping:

      grep -rn "AsExisting\|asExisting\|Connect to an existing" src/frontend/src/content/docs/integrations/
      

      Known affected pages from issues: caching/redis/redis-host.mdx (Redis: Add an existing Redis instance Not Found Method AsExisting #1074) and messaging/rabbitmq/rabbitmq-host.mdx ((Aspire doc) Connect to an existing RabbitMQ instance #1092). Likely also: Postgres, MySQL, MongoDB, Valkey, Garnet, Kafka, NATS, Qdrant, Milvus, SQL Server, Oracle, Elasticsearch, SeqHosting, etc. — anything not under cloud/azure/.

    2. For each non-Azure page that documents AsExisting:

      • Remove the C# AsExisting(...) example.
      • Replace with the connection-string–based pattern that actually works for non-Azure resources, e.g.:
        var rabbitmq = builder.AddConnectionString("messaging");
        
        var exampleProject = builder.AddProject<Projects.ExampleProject>("apiservice")
            .WithReference(rabbitmq);
        The TypeScript side already documents this correctly (builder.addConnectionString(...)); mirror that wording on the C# side.
      • Keep the section heading "Connect to an existing X instance" — it's a valid scenario, just needs the correct API.
    3. Do not touch anything under src/frontend/src/content/docs/integrations/cloud/azure/ — AsExisting, RunAsExisting, PublishAsExisting are legitimately documented there.

    4. Apply the same edits to the Japanese mirrors under src/frontend/src/content/docs/ja/integrations/... for every page changed in step 2.

    Acceptance

    • grep -rn "AsExisting" src/frontend/src/content/docs/integrations/ returns hits only under cloud/azure/ (and JA mirror of same).
    • Each fixed page builds (npm run build in src/frontend/) with no broken links/anchors.
    • The "Connect to an existing X instance" section on each fixed page shows a connection-string pattern that compiles against Aspire.Hosting.<X> 13.3.x.
    • Closes (Aspire doc) Connect to an existing RabbitMQ instance #1092 as part of this PR (mention it in the PR description).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

No labels
No labels

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions