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

Order secret outputs in stack references #4489

Merged
merged 3 commits into from
Apr 27, 2020
Merged

Conversation

jaxxstorm
Copy link
Contributor

When referencing secretOutputNames in from another stack, spurious
diffs can often be created because the secret output slice was not
ordered.

This PR orders the slice before it's added to the propertymap, ensuring
the order always remains the same

Fixes #4176

Before:

~ stack_one: [
      ~ [0]: "Alpha" => "Beta"
      ~ [1]: "Beta" => "Delta"
      ~ [2]: "Delta" => "Epsilon"
      ~ [3]: "Epsilon" => "Alpha"
    ]

After:

Outputs:
  ~ stack_one: [
      ~ [0]: "Delta" => "Alpha"
      ~ [1]: "Epsilon" => "Beta"
      ~ [2]: "Alpha" => "Delta"
      ~ [3]: "Beta" => "Epsilon"
    ]

When referencing `secretOutputNames` in from another stack, spurious
diffs can often be created because the secret output slice was not
ordered.

This PR orders the slice before it's added to the propertymap, ensuring
the order always remains the same
CHANGELOG.md Outdated Show resolved Hide resolved
pkg/resource/deploy/builtins.go Outdated Show resolved Hide resolved
jaxxstorm and others added 2 commits April 25, 2020 12:36
Co-Authored-By: Justin Van Patten <jvp@justinvp.com>
Co-Authored-By: Justin Van Patten <jvp@justinvp.com>
Copy link
Member

@justinvp justinvp left a comment

Choose a reason for hiding this comment

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

LGTM

@jaxxstorm jaxxstorm merged commit 8d7cb5d into master Apr 27, 2020
@pulumi-bot pulumi-bot deleted the jaxxstorm/ordered_secrets branch April 27, 2020 16:36
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.

Secret Output Names of StackReferences are shown as different.
2 participants