Compare commits

...

4 commits

Author SHA1 Message Date
evanboyle 277ea5ea28 Merge branch 'master' of https://github.com/pulumi/pulumi into evan/secretUnknowns 2020-04-13 14:02:47 -07:00
evanboyle 69dae12d79 add test for secret computed values 2020-04-13 14:01:19 -07:00
evanboyle 6f47afea37 changelog 2020-04-13 13:22:47 -07:00
evanboyle dbc7a8532f fix unknown status for secrets wrapping unknowns 2020-04-13 13:20:36 -07:00
3 changed files with 16 additions and 0 deletions

View file

@ -62,6 +62,9 @@ CHANGELOG
- Fix Go SDK stack reference helpers to handle nil values
[#4370](https://github.com/pulumi/pulumi/pull/4370)
- Fix propagation of unknown status for secrets
[#4377](https://github.com/pulumi/pulumi/pull/4377)
## 1.14.0 (2020-04-01)
- Fix error related to side-by-side versions of `@pulumi/pulumi`.
[#4235](https://github.com/pulumi/pulumi/pull/4235)

View file

@ -326,6 +326,8 @@ func (v PropertyValue) ContainsUnknowns() bool {
}
} else if v.IsObject() {
return v.ObjectValue().ContainsUnknowns()
} else if v.IsSecret() {
return v.SecretValue().Element.ContainsUnknowns()
}
return false
}

View file

@ -159,3 +159,14 @@ func TestCopy(t *testing.T) {
src["c"] = NewNumberProperty(99.99)
assert.Equal(t, 2, len(dst))
}
func TestSecretUnknown(t *testing.T) {
o := NewOutputProperty(Output{Element: NewNumberProperty(46)})
so := MakeSecret(o)
assert.True(t, o.ContainsUnknowns())
assert.True(t, so.ContainsUnknowns())
c := NewComputedProperty(Computed{Element: NewStringProperty("X")})
co := MakeSecret(so)
assert.True(t, c.ContainsUnknowns())
assert.True(t, co.ContainsUnknowns())
}