Conversation
playground/ParameterEndToEnd/ParameterEndToEnd.AppHost/aspire-manifest.json
Outdated
Show resolved
Hide resolved
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
590f29d to
0f01ee7
Compare
src/Aspire.Hosting/Extensions/ParameterResourceBuilderExtensions.cs
Outdated
Show resolved
Hide resolved
src/Aspire.Hosting/Extensions/ParameterResourceBuilderExtensions.cs
Outdated
Show resolved
Hide resolved
0f01ee7 to
31c961f
Compare
|
There is a wrinkle with this approach. Look at the manifest fragment it generates: The |
|
Actually we could possibly just modify |
Yes this is what I am thinking too. I originally added this whole surrogate thing, but I think WithReference should just stay the same and we should change how we emit the Parameter to make it work like magic. |
6497328 to
45cd778
Compare
|
OK this is ready for another round of review. |
|
One minor tweak suggested. This looks good, but needs to be tested with |
playground/ParameterEndToEnd/ParameterEndToEnd.AppHost/Program.cs
Outdated
Show resolved
Hide resolved
| /// Configures the manifest writer for this resource to be a parameter resource. | ||
| /// </summary> | ||
| /// <param name="builder">The <see cref="IResourceBuilder{T}"/>.</param> | ||
| public static void ConfigureConnectionStringManifestPublisher(IResourceBuilder<IResourceWithConnectionString> builder) |
There was a problem hiding this comment.
Yes, other resources might want to expose this. Right now, the other extension method is constrained to ContainerResource, IResourceWithConnectionString
c38c661 to
23d787f
Compare
- This is a shortcut for writing the resource as an external entity in the manifest.
23d787f to
6050d01
Compare
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |

Building on top of Parameter support, we can now add
PublishAsConnectionString.The above will use a container when running but will publish a parameter to the manifest. This is a short cut for the very common scenario:
Contributes to #1960
Microsoft Reviewers: Open in CodeFlow