-
Notifications
You must be signed in to change notification settings - Fork 693
Labels
area-deploymentazureIssues associated specifically with scenarios tied to using AzureIssues associated specifically with scenarios tied to using Azure
Milestone
Description
dotnet(51856) stdout: fail: Aspire.Hosting.DistributedApplicationRunner[0]
dbug: Aspire.Cli.DotNetCliRunner[0]
dotnet(51856) stdout: Failed to publish the distributed application.
dbug: Aspire.Cli.DotNetCliRunner[0]
dotnet(51856) stdout: System.Collections.Generic.KeyNotFoundException: The given key 'Aspire.Hosting.ApplicationModel.ParameterResource' was not present in the dictionary.
dbug: Aspire.Cli.DotNetCliRunner[0]
dotnet(51856) stdout: at System.Collections.Generic.Dictionary`2.get_Item(TKey key)
dbug: Aspire.Cli.DotNetCliRunner[0]
dotnet(51856) stdout: at Aspire.Hosting.Azure.AzurePublishingContext.WriteAzureArtifactsOutputAsync(DistributedApplicationModel model, CancellationToken _) in /_/src/Aspire.Hosting.Azure/AzurePublishingContext.cs:line 186
dbug: Aspire.Cli.DotNetCliRunner[0]
dotnet(51856) stdout: at Aspire.Hosting.Azure.AzurePublishingContext.WriteModelAsync(DistributedApplicationModel model, CancellationToken cancellationToken) in /_/src/Aspire.Hosting.Azure/AzurePublishingContext.cs:line 56
dbug: Aspire.Cli.DotNetCliRunner[0]
dotnet(51856) stdout: at Aspire.Hosting.Azure.AzurePublisher.PublishAsync(DistributedApplicationModel model, CancellationToken cancellationToken) in /_/src/Aspire.Hosting.Azure/AzurePublisher.cs:line 51
dbug: Aspire.Cli.DotNetCliRunner[0]
dotnet(51856) stdout: at Aspire.Hosting.DistributedApplicationRunner.ExecuteAsync(CancellationToken stoppingToken) in /_/src/Aspire.Hosting/DistributedApplicationRunner.cs:line 46
dbug: Aspire.Cli.Backchannel.AppHostBackchannel[0]
Requesting publishing activities.
dbug: Aspire.Cli.DotNetCliRunner[0]
Connected to AppHost backchannel at C:\Users\davifowl\.dotnet\aspire\cli\backchannels\cli.sock.00d4ebd73903432a8d685bf90ee04bb1
dbug: Aspire.Cli.Backchannel.AppHostBackchannel[0]
Received publishing activities.
]
#pragma warning disable ASPIREAZURE001 // Type is for evaluation purposes only and is subject to change or removal in future updates. Suppress this diagnostic to proceed.
var builder = DistributedApplication.CreateBuilder(args);
var kvName = builder.AddParameterFromConfiguration("kvName", "kv:name");
var kvRg = builder.AddParameterFromConfiguration("kvRg", "kv:resourceGroup");
builder.AddAzureContainerAppEnvironment("cae");
builder.AddAzurePublisher();
var kv = builder.AddAzureKeyVault("kv")
.AsExisting(kvName, kvRg);
var secret = kv.Resource.GetSecret("openaikey");
builder.AddProject<Projects.WebApplication1>("app")
.WithEnvironment(context =>
{
context.EnvironmentVariables["OPENAI_KEY"] = secret;
})
.WithExternalHttpEndpoints();
builder.Build().Run();
Metadata
Metadata
Assignees
Labels
area-deploymentazureIssues associated specifically with scenarios tied to using AzureIssues associated specifically with scenarios tied to using Azure