diff --git a/changelog/pending/20221025--auto-dotnet--add-json-option-to-updateoptions.yaml b/changelog/pending/20221025--auto-dotnet--add-json-option-to-updateoptions.yaml new file mode 100644 index 000000000000..46d460b3ac73 --- /dev/null +++ b/changelog/pending/20221025--auto-dotnet--add-json-option-to-updateoptions.yaml @@ -0,0 +1,4 @@ +changes: +- type: feat + scope: auto/dotnet + description: Add Json option to UpdateOptions. diff --git a/sdk/dotnet/Pulumi.Automation/UpdateOptions.cs b/sdk/dotnet/Pulumi.Automation/UpdateOptions.cs index db22894720d0..4a85c7079ef1 100644 --- a/sdk/dotnet/Pulumi.Automation/UpdateOptions.cs +++ b/sdk/dotnet/Pulumi.Automation/UpdateOptions.cs @@ -66,5 +66,10 @@ public class UpdateOptions /// Print detailed debugging output during resource operations /// public bool? Debug { get; set; } + + /// + /// Format standard output as JSON not text. + /// + public bool? Json { get; set; } } } diff --git a/sdk/dotnet/Pulumi.Automation/WorkspaceStack.cs b/sdk/dotnet/Pulumi.Automation/WorkspaceStack.cs index 13ed9d1ff8bd..d6a29b0fae9b 100644 --- a/sdk/dotnet/Pulumi.Automation/WorkspaceStack.cs +++ b/sdk/dotnet/Pulumi.Automation/WorkspaceStack.cs @@ -800,6 +800,11 @@ static void ApplyUpdateOptions(UpdateOptions options, List args) { args.Add("--debug"); } + + if (options.Json is true) + { + args.Add("--json"); + } } } }