azure-libraries-for-net: [BUG] Deployment Outputs object is not set on deployments created with Fluent API.
Description Deployment Outputs object is not set on deployments created with Fluent API.
To Reproduce Steps to reproduce the behavior:
- Create an ARM template producing some basic outputs, e.g.
{ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", "contentVersion": "1.0.0.0", "resources": [], "outputs": { "result": { "type": "string", "value": "Ok" } } } - Initialize an azure object of the Microsoft.Azure.Management.Fluent.IAzure type, as described in https://docs.microsoft.com/en-us/azure/virtual-machines/windows/csharp-template
- Deploy the above template (templateJson- parameter) to an existing resource group ( resourceGroup parameter) with
var deployment = azure.Deployments.Define($"myDeployment") .WithExistingResourceGroup(resourceGroup) .WithTemplate(templateJson) .WithParameters("{}") .WithMode(Microsoft.Azure.Management.ResourceManager.Fluent.Models.DeploymentMode.Incremental).Create(); Debug.Assert(deployment.Outputs != null);
Code Snippet Debug.Assert(deployment.Outputs != null);
Expected behavior The Debug.Assert(deployment.Outputs != null) assertion should pass.
Setup:
- OS: Windows
- IDE : Visual Studio
- Microsoft.Azure.Management.Fluent 1.26.1
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Comments: 18 (8 by maintainers)
@yungezz @weidongxu-microsoft