Skip to content
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

Warn when additionalSecretOutputs includes id #9360

Merged
merged 2 commits into from Apr 7, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG_PENDING.md
Expand Up @@ -9,5 +9,8 @@
- [cli] Display more useful diffs for secrets that are not primitive values
[#9351](https://github.com/pulumi/pulumi/pull/9351)

- [cli] - Warn when `additionalSecretOutputs` is used to mark the `id` property as secret.
[#9360](https://github.com/pulumi/pulumi/pull/9360)

### Bug Fixes

9 changes: 9 additions & 0 deletions pkg/resource/deploy/step_generator.go
Expand Up @@ -284,6 +284,15 @@ func (sg *stepGenerator) generateSteps(event RegisterResourceEvent) ([]Step, res
}
sg.urns[urn] = true

for _, secret := range goal.AdditionalSecretOutputs {
if secret == "id" {
sg.deployment.ctx.Diag.Warningf(&diag.Diag{
URN: urn,
Message: "The 'id' property cannot be made secret. See pulumi/pulumi#2717 for more details.",
})
}
}

// Check for an old resource so that we can figure out if this is a create, delete, etc., and/or
// to diff. We look up first by URN and then by any provided aliases. If it is found using an
// alias, record that alias so that we do not delete the aliased resource later.
Expand Down