prehistoric-house-26852
05/14/2023, 1:06 AMpassword, err := random.NewRandomPassword(ctx, "password", &random.RandomPasswordArgs{
Length: <http://pulumi.Int|pulumi.Int>(PasswordLength),
Special: pulumi.Bool(true),
OverrideSpecial: pulumi.String("!#$%&*()-_=+[]{}<>:?"),
})
if err != nil {
return nil, err
}
args.Password = password.Result
user, err := kafka.NewUserScramCredential(ctx, fmt.Sprintf("%s", args.Username), args, pulumi.Provider(provider))
if err != nil {
return nil, err
}
ctx.Export("id", user.ID())
ctx.Export("updatedAt", pulumi.StringPtr(fmt.Sprintf("%d", time.Now().Unix())))
ctx.Export("password", password.Result)
For our usecase, we want to export this to context. However, it seems the passowrd.Result is rendered as [secret] instead of the actual string. Is there a way to get the actual string?
I also tried
password.Result.ApplyT(func(pwd string) error {
ctx.Export("password", pulumi.String(pwd))
return nil
})
but this does not seem get executed at allbillowy-army-68599
ctx.Export()
and then use pulumi stack output --show-secrets
prehistoric-house-26852
05/14/2023, 11:44 PM