-
Notifications
You must be signed in to change notification settings - Fork 157
Open
Labels
Description
Type of issue
Missing information
Description
We should have a section in the Azure docs that explain how to customize bicep by using an "InfrastructureResolver".
Here's one such example that is working around a bug in our SQL deployment script: dotnet/aspire#9926 (comment).
Another example, which doesn't give a code example: https://learn.microsoft.com/en-us/dotnet/aspire/compatibility/9.0/provisioning-context
The key information is:
- Create a class that derives from
InfrastructureResolver
and implements the necessary customization. I'm not sure if there is a better link, but https://learn.microsoft.com/en-us/dotnet/api/azure.provisioning.primitives.infrastructureresolver describes the class. - On the
DistributedApplicationBuilder
, configure theAzureProvisioningOptions
to add the class from (1):
builder.Services.Configure<AzureProvisioningOptions>(options =>
{
options.ProvisioningBuildOptions.InfrastructureResolvers.Add(new MyInfrastructureResolver());
});
Page URL
https://learn.microsoft.com/en-us/dotnet/aspire/azure/integrations-overview?tabs=dotnet-cli
Content source URL
Document Version Independent Id
9949dba9-a268-b3ff-b62f-ca07429281c1
Platform Id
752b5bf5-8119-0db7-55a6-e656fca0b438