-
Notifications
You must be signed in to change notification settings - Fork 7
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
Fixing Deployment Secrets - Plaintext in Inputs #325
Conversation
7c7285d
to
4bd540b
Compare
d2e8bec
to
be8a6a0
Compare
currentStateCipherSettings.SourceContext.Git != nil && | ||
currentStateCipherSettings.SourceContext.Git.GitAuth != nil && | ||
currentStateCipherSettings.SourceContext.Git.GitAuth.SSHAuth != nil { | ||
plaintextValue = &plaintextInputSettings.SourceContext.Git.GitAuth.SSHAuth.SSHPrivateKey |
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.
Is this guaranteed to exist? What happens if plaintextInputSettings.SourceContext.Git.GitAuth.SSHAuth
is nil
?
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.
Yes, if a value in plaintextInputSettings exists, it also exists in plaintextInputSettings, because they are retrieved from inputs and outputs of the current state
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.
I'm guessing you meant "if a value in currentStateCipherSettings exists, it also exists in plaintextInputSettings"?
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.
Ah, yes, sorry!
Note: there is an alternative implementation of this PR - #320
Summary
Testing
Example TS program (Sadly can't use Dotnet, due to bug with maps):
Secret resource values end up with just cipher, while plaintext is stored in inputs:
Passwords and sshKey are forced into twin secrets, Environment Variables are optionally twin secrets, everything else uses normal Pulumi workflows, because they are not secret in Pulumi Service.
Import of the above code generates successfully with dummy values for secrets: