rhythmic-accountant-71070
12/04/2023, 6:41 PMpackage main
import (
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"errors"
"os"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
if os.Getenv("FAIL") == "true" {
return errors.New("ERROR")
}
ctx.Export("output", pulumi.String("string"))
return nil
})
}
After the first run, I the output is set.
Type Name Status
pulumi:pulumi:Stack pulumi-output-dissapear-dev
Outputs:
+ output: "string"
With FAIL=true env var my output is disappeared.
Type Name Status Info
pulumi:pulumi:Stack pulumi-output-dissapear-dev **failed** 1 error
Diagnostics:
pulumi:pulumi:Stack (pulumi-output-dissapear-dev):
error: an unhandled error occurred: program failed:
1 error occurred:
* ERROR
Outputs:
- output: "string"
Is it desired behavior?
[spigell@dragonfish pulumi-output-dissapear ]$ pulumi stack output
Current stack outputs (0):
No output values currently in this stack
billions-river-87988
12/06/2023, 8:57 PM