-
Notifications
You must be signed in to change notification settings - Fork 258
Add concept file for stash resource #16625
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
base: master
Are you sure you want to change the base?
Conversation
Documentation ReviewI've reviewed the new Stash resource documentation. Overall, this is a well-structured introduction to the Stash feature with clear examples across all supported languages. Here are my findings: Issues FoundGrammar and ClarityLine 16: Missing article before "built-in"
Line 17: Awkward phrasing - "This value is stateful and won't change"
Line 132: Grammar error - "it's" should be "its"
Style Guide ViolationsLine 345: The update behavior section is unclear about the core concept
Line 348-352: List formatting issue
Code ExamplesLines 382, 405, 541, 575: Go example has incorrect username retrieval
import (
"os/user"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
currentUser, err := user.Current()
if err != nil {
return err
}
firstDeployer, err := pulumi.NewStash(ctx, "firstDeployer", &pulumi.StashArgs{
Input: pulumi.String(currentUser.Username),
})
if err != nil {
return err
}
// The output will always show the original deployer, even if others run updates later
ctx.Export("originalDeployer", firstDeployer.Output)
return nil
})
}Lines 551, 569, 599, 625, 648: Incomplete examples with placeholder function calls
For TypeScript (line 551): import * as pulumi from "@pulumi/pulumi";
import * as random from "@pulumi/random";
// Generate a random password once
const randomPassword = new random.RandomPassword("dbPassword", {
length: 16,
special: true,
});
// Stash it so it doesn't change on subsequent deployments
const passwordStash = new pulumi.Stash("passwordStash", {
input: pulumi.secret(randomPassword.result),
});
// Use the stashed password for database configuration
export const dbPassword = passwordStash.output;Similar fixes needed for Python (line 569), Go (line 599), C# (line 625), and Java (line 648). Missing ContentLine 706: Missing trailing newline
SummaryThis documentation provides a solid foundation for understanding the Stash resource. The main issues are:
Once these issues are addressed, this will be excellent documentation for the Stash feature. Mention @claude if you'd like me to review the updated changes or help fix any of these issues. |
|
Your site preview for commit 95d3a09 is ready! 🎉 http://www-testing-pulumi-docs-origin-pr-16625-95d3a09e.s3-website.us-west-2.amazonaws.com. |
|
@claude review this again |
|
Claude finished @Frassle's task —— View job Re-review of Stash DocumentationTodo List
Review FindingsI've reviewed the current version of the documentation. Here's what I found: ✅ Issues FixedGreat work! The following issues from my previous review have been addressed:
|
julienp
left a comment
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.
LGTM! We can come back here and link to TriggerReplacement when we have the docs for that shipped. I think there might still be some of the SDKs outstanding for that?
|
|
||
| ## Stashing secret values | ||
|
|
||
| The `Stash` resource respects secret annotations. If the `input` value is marked as a secret, the `output` will also be secret, and the value will be encrypted in your stack's 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.
just curious--did we validate that this holds for nested inputs?
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.
We roundtrip the property value as-is, so it will depend on the language marshaling layer but Stash never reduces the amount of secretness
|
|
||
| {{< /chooser >}} | ||
|
|
||
| When viewing stashed secret values, their plaintext content will not be shown by default. Instead, they will be displayed as `[secret]` in the CLI. Pass `--show-secrets` to reveal the plaintext value. |
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.
pass --show-secrets where? up/preview/etc.?
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.
up, preview, stack, export, there's a load of commands that take this option. Maybe
"Pass --show-secrets to the command ran to reveal the plaintext value."?
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.
yeah that sounds reasonable
| 1. Using the `--target-replace` argument to `up` to tell the engine to replace it. | ||
| 1. Using `pulumi state taint` to mark the resource to be replaced on the next deployment. | ||
| 1. Using the `TriggerReplacement` resource option to trigger the resource to replace on a change of value. |
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'd reorder these so the resource option is first, personally.
also wondering if we should consider a keeper-style property in the future that has replace semantics
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.
also wondering if we should consider a keeper-style property in the future that has replace semantics
Briefly what would that look like? I'd have thought that's what TriggerReplacement is.
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 I think I misunderstood that bullet point. Yeah we can just use that.
Though that does raise another question--where are the docs for that option? I don't see it here: https://www.pulumi.com/docs/iac/concepts/resources/options/
Kind of a meta-point that it would be great to add links to the docs for the various suggested commands as well.
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.
TomH is still getting around to finishing that workstream off. I was planning on linking it once it was in place.
Proposed changes
Unreleased product version (optional)
Related issues (optional)