-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add the ability to pulumi.unsecret an existing output #6086
Conversation
After speaking with @lukehoban we are going to revert the changes to IsSecret and have a top level func 'isSecret' alongside 'unsecret' - this will ensure we don't break the backwards compatibility with old versions |
ca0a3c6
to
43c44ca
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Couple of comment/changelog things to fix up but otherwise LGTM
1b639fe
to
fe2d457
Compare
Related: #5653 This will take an existing output and then unwrap the secret, and return a new output ``` import * as pulumi from "@pulumi/pulumi"; const x = pulumi.secret("test") export const xVal = x; const y = pulumi.unsecret(x); export const yVal = y; ``` ``` ▶ pulumi stack output Current stack outputs (3): OUTPUT VALUE xVal [secret] yVal test ``` Also adds the ability to check if an output is as secret: ``` import * as pulumi from "@pulumi/pulumi"; const x = pulumi.secret("test") const isSecret = x.isSecret; export const isSecretDeets = isSecret; ```
fe2d457
to
ae3ecde
Compare
So @justinvp and I had a call about this - we are going to leave these funcs as taking the Output itself for now - if we decide that needs to change in the future then we can do so. |
Related: #5653
This will take an existing output and then unwrap the secret, and
return a new output
Also adds the ability to check if an output is as secret: