Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support referencing existing Service Bus resources in references #7249

Open
wants to merge 9 commits into
base: main
Choose a base branch
from

Conversation

captainsafia
Copy link
Member

Opening this PR to sanity check the approach before adding it to other resource types. Some things of note:

  • Support for referencing existing resources in other subscription IDs/resource groups isn't implemented due to a gap in the underlying provisioning APIs. See [FEATURE REQ] FromExisting methods should support setting scopes Azure/azure-sdk-for-net#47980. There are workarounds for the but the juice might not be worth the squeeze.
  • Separate APIs for publishing/running with an existing resource backed by an annotation and explicit checks in the ConfigureInfrastructure calls for each resource.

@davidfowl
Copy link
Member

Opening this PR to sanity check the approach before adding it to other resource types. Some things of note:

This should be a draft right?

}

[Fact]
public async Task RequiresPublishAsExistingInPublishMode()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(nit) Is this test name correct? the test calls RunAsExisting

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, the test name is correct although confusing. I was intending to say that you need to call PublishAsExisting in publish-mode otherwise the API effectively no-ops.

@@ -86,7 +96,7 @@ public static IResourceBuilder<AzureServiceBusResource> AddAzureServiceBus(this
infrastructure.Add(cdkRule);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does generating these Queues and Topics work with an existing resource?

@danmoseley danmoseley requested review from Copilot and removed request for Copilot January 28, 2025 16:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants