Make it possible to use endpoints to containers, projects or dockerfiles in bicep parameters
davidfowl opened this issue · comments
Follow up from #3820
var builder = DistributedApplication.CreateBuilder(args);
var p = builder.AddProject<Projects.WebApplication1>("webapplication1");
var az = builder.AddAzureStorage("storage")
.WithParameter("z", () => p.GetEndpoint("http"))
.RunAsEmulator().AddQueues("q1");
builder.Build().Run();
Results in
module storage 'storage/storage.module.bicep' = {
name: 'storage'
scope: rg
params: {
location: location
principalId: resources.outputs.MANAGED_IDENTITY_PRINCIPAL_ID
principalType: 'ServicePrincipal'
z: 'http://webapplication1.internal.{{ .Env.AZURE_CONTAINER_APPS_ENVIRONMENT_DEFAULT_DOMAIN }
}
}
Notice the go template syntax in the bicep. This should just use the bicep value instead of the go template (when in this context).