-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
return correct element types for latebound resources (#664)
We currently return a pointer to the interface for latebound resources from their ElementType methods. However pulumi expects pointers to the concrete type here, so it can create it and assign values to the created object. Fix that. In particular this can happen when calling `fn::secret` on a created resource. Currently that will panic because the internals get confused by this wrong `ElementType`. I'm not sure it makes all that much sense to even call `fn::secret` on this, but we shouldn't panic either. Fixes pulumi/pulumi#17530. I'm not sure this completely fixes it as I've managed to produce a slightly different panic, but not the same one. For lack of better ideas I'm gonna claim this fixes it for now, and we can revisit if we get any more panic reports with a pulumi version with this fix included.
- Loading branch information
Showing
4 changed files
with
32 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
component: runtime | ||
kind: Bug Fixes | ||
body: Fix potential panic when using fn::secret on a resource | ||
time: 2024-10-14T17:31:02.140545881+02:00 | ||
custom: | ||
PR: "664" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
name: resource-secret | ||
runtime: | ||
name: yaml | ||
resources: | ||
randomPassword: | ||
type: random:RandomPassword | ||
properties: | ||
length: 16 | ||
lower: true | ||
upper: true | ||
numeric: true | ||
special: true | ||
outputs: | ||
superSecret: | ||
fn::secret: ${randomPassword} |