-
Notifications
You must be signed in to change notification settings - Fork 533
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
base: main
Are you sure you want to change the base?
Conversation
This should be a draft right? |
src/Aspire.Hosting.Azure.ServiceBus/AzureServiceBusExtensions.cs
Outdated
Show resolved
Hide resolved
src/Aspire.Hosting/ApplicationModel/ExistingResourceAnnotation.cs
Outdated
Show resolved
Hide resolved
src/Aspire.Hosting.Azure.ServiceBus/AzureServiceBusExtensions.cs
Outdated
Show resolved
Hide resolved
src/Aspire.Hosting/ApplicationModel/ExistingResourceAnnotation.cs
Outdated
Show resolved
Hide resolved
src/Aspire.Hosting.Azure/Provisioning/Provisioners/AzureProvisioner.cs
Outdated
Show resolved
Hide resolved
src/Aspire.Hosting.Azure.ServiceBus/AzureServiceBusExtensions.cs
Outdated
Show resolved
Hide resolved
} | ||
|
||
[Fact] | ||
public async Task RequiresPublishAsExistingInPublishMode() |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
src/Aspire.Hosting.Azure.ServiceBus/AzureServiceBusExtensions.cs
Outdated
Show resolved
Hide resolved
@@ -86,7 +96,7 @@ public static IResourceBuilder<AzureServiceBusResource> AddAzureServiceBus(this | |||
infrastructure.Add(cdkRule); |
There was a problem hiding this comment.
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?
Opening this PR to sanity check the approach before adding it to other resource types. Some things of note:
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.ConfigureInfrastructure
calls for each resource.