pulumi / pulumi-dotnet

.NET support for Pulumi
Apache License 2.0
27 stars 25 forks source link

Improve documentation around usage of `LocalWorkspace.CreateAsync` #391

Open smithrobs opened 6 days ago

smithrobs commented 6 days ago

Hello!

Issue details

Slightly related to the tests for #382 - it seems LocalWorkspace.CreateAsync requires either WorkDir or ProjectSettings to be set. Otherwise, when attempting to delete the stack an unhelpful error is given as (I assume) there's no project to infer:

  Error Message:
   Pulumi.Automation.Commands.Exceptions.CommandException : code: 255
stdout: 
stderr: error: if you're using the --stack flag, pass the fully qualified name (organization/project/stack)

  Stack Trace:
     at Pulumi.Automation.Commands.LocalPulumiCommand.RunAsyncInner(IList`1 args, String workingDir, IDictionary`2 additionalEnv, Action`1 onStandardOutput, Action`1 onStandardError, String stdIn, EventLogFile eventLogFile, CancellationToken cancellationToken) in /_/sdk/Pulumi.Automation/Commands/LocalPulumiCommand.cs:line 356
   at Pulumi.Automation.Commands.LocalPulumiCommand.RunInputAsync(IList`1 args, String workingDir, IDictionary`2 additionalEnv, Action`1 onStandardOutput, Action`1 onStandardError, String stdIn, Action`1 onEngineEvent, CancellationToken cancellationToken) in /_/sdk/Pulumi.Automation/Commands/LocalPulumiCommand.cs:line 302 

Affected area/feature

Automation API