Skip to content

Support child resources #57

Closed

Description

@jrunestone

Hi,

I've been using this since pre-release and now in a production environment and I could NOT have orchestrated everything in a single AppHost.cs, so thanks a lot, this is great :)

I was thinking though, that some resources could benefit from having separate child resource kits. For example, creating a VNET and then 10 subnets still ends up being a really big file with lots of concerns.

I could just extract the subnets to different kits right now, but they are built based on the parent VNET resource (var snet = vnet.AddSubnet()) and the BuildResource() method is run without any explicit order I believe, so we'd need a a way to define a dependency here. E.g. [ResourceDefinition<AzureSubnetResource>("snet-1", dependsOn: "vnet")].

Other examples: sql databases, service bus topics/queues/subscriptions, storage options, blob containers.

Thoughts?

Activity

  1. kieronlanning commented on Nov 12, 2026

    @kieronlanning
    Contributor

    Thanks @jrunestone! It's great to know others are using this too - I love this idea.

    If you have any examples of how you might think this would look, I'll more than happily take a look.

    I'd need to ensure there's not infinite recursion issues of course, but that should be transparent to the caller...

    The next release will include the ability to add groups to the UI, which utilises a similar means of organisation...

  2. jrunestone commented on Nov 12, 2026

    @jrunestone
    Author

    Hi @kieronlanning!

    I didn't have time to give you some examples there :) Looks promising thanks, I'll be sure to try it out when there's a release.

  3. kieronlanning commented on Nov 12, 2026

    @kieronlanning
    Contributor

    @jrunestone Release 2.0.0-prerelease.1 is heading to nuget as I type this - it's only a pre-release, so it can be changed before a stable release.

    Examples and Details can be found here - https://github.com/purview-dev/aspire-resourcekit/blob/main/docs/wiki/Hierarchies.md

    Let me know what you think!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions