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

[sdk/go] Improve unknown stack references preview #9855

Merged
merged 4 commits into from Jun 14, 2022

Conversation

iwahbe
Copy link
Member

@iwahbe iwahbe commented Jun 14, 2022

Description

When a valid stack reference is asked to retrieve an absent key as a string, the default value is returned. This results in previews displaying "" as the value of the stack reference key. See the linked issue for an example.

This PR makes the following changes:

  1. When the value is absent during a preview, return an unknown output. This fixes the linked issue.
  2. When the value is absent during a pulumi up, error when a string is requested. This brings the behavior of string inline with Int and Float64.

Fixes #9365

Checklist

  • I have added tests that prove my fix is effective or that my feature works
  • Yes, there are changes in this PR that warrants bumping the Pulumi Service API version

@iwahbe iwahbe self-assigned this Jun 14, 2022
Copy link
Member

@AaronFriel AaronFriel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@AaronFriel AaronFriel merged commit 818c81a into master Jun 14, 2022
@pulumi-bot pulumi-bot deleted the iwahbe/9365/go-improve-unknown-stack-references branch June 14, 2022 01:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Issues with previews of array values from StackReferences
2 participants