This message was deleted.
s
This message was deleted.
l
From https://www.pulumi.com/docs/intro/concepts/config/#a-warning-using-secrets-in-code:
A Warning: Using Secrets in Code
On pulumi up, secret values are decrypted and made available in plaintext at runtime. These may be read through any of the standard pulumi.Config getters shown above. While it is possible to read a secret using the ordinary non-secret getters, this is almost certainly not what you want. Use the secret variants of the configuration APIs instead, since this ensures that all transitive uses of that secret are themselves also marked as secrets.
Therefore, use
requireObject
or other non-secret variations to get outputs that aren't marked as secret. You'll only be able to see the values during
up
.
You can compose new outputs from those non-secret outputs in the normal way.
s
Thanks, but that's not what I need. I should have been more precise. I'm not talking about a config value but I've a secret from a resource output in my typescript code and want to mark that one as not secret and create a non secret stack output from it.
l
Ah. I'm not aware of one, but once you're in an
apply
, the value is no longer secret. The only effect of secret that I'm aware of is to mask output values on the console. So you could work around an output being secret by using
Copy code
secretOutput.apply(x => <http://pulumi.log.info|pulumi.log.info>(`The secret value is ${x}`));