Merge pull request #4489 from pulumi/jaxxstorm/ordered_secrets

Order secret outputs in stack references
This commit is contained in:
Lee Briggs 2020-04-27 09:36:29 -07:00 committed by GitHub
commit 8d7cb5d99a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 0 deletions

View file

@ -3,6 +3,9 @@ CHANGELOG
## HEAD (unreleased)
- Order secretOutputNames when used in stack references
[#4489](https://github.com/pulumi/pulumi/pull/4489)
- Add support for a `PULUMI_CONSOLE_DOMAIN` environment variable to override the
behavior for how URLs to the Pulumi Console are generated.
[#4410](https://github.com/pulumi/pulumi/pull/4410)

View file

@ -3,6 +3,7 @@ package deploy
import (
"context"
"fmt"
"sort"
"github.com/pkg/errors"
uuid "github.com/satori/go.uuid"
@ -209,6 +210,11 @@ func (p *builtinProvider) readStackReference(inputs resource.PropertyMap) (resou
}
}
// Sort the secret outputs so the order is deterministic, to avoid spurious diffs during updates.
sort.Slice(secretOutputs, func(i, j int) bool {
return secretOutputs[i].String() < secretOutputs[j].String()
})
return resource.PropertyMap{
"name": name,
"outputs": resource.NewObjectProperty(outputs),