https://pulumi.com logo
#dotnet
Title
# dotnet
b

bored-flower-84342

01/13/2023, 2:30 PM
using IHost host = Host.CreateDefaultBuilder(args)
.ConfigureServices(services =>
{
services.AddScoped<IResourceGroupService, ResourceGroupService>();
services.AddScoped<INetworkStackDeploymentService, NetworkStackDeploymentService>();
services.AddScoped<IVirtualNetworkService, VirtualNetworkService>();
})
.Build();
return await Pulumi.Deployment.RunAsync(async () =>
{
var networkStackDeploymentService = host.Services.GetRequiredService<INetworkStackDeploymentService>();
var result = await networkStackDeploymentService.DeployNetworkStackAsync();
});