add FIXMEs
This new codepath with the getDiff "customzed" return value, along with the associated test need to be removed as soon as we can support unset fields from the config, so we don't continue to carry this broken behavior forward any longer than needed.
This commit is contained in:
parent
cb5ce1d35e
commit
0df8da59f7
|
@ -337,6 +337,11 @@ func (s *Schema) finalizeDiff(d *terraform.ResourceAttrDiff, customized bool) *t
|
|||
}
|
||||
|
||||
if s.Computed {
|
||||
// FIXME: This is where the customized bool from getChange finally
|
||||
// comes into play. It allows the previously incorrect behavior
|
||||
// of an empty string being used as "unset" when the value is
|
||||
// computed. This should be removed once we can properly
|
||||
// represent an unset/nil value from the configuration.
|
||||
if !customized {
|
||||
if d.Old != "" && d.New == "" {
|
||||
// This is a computed value with an old value set already,
|
||||
|
|
|
@ -3113,6 +3113,8 @@ func TestSchemaMap_Diff(t *testing.T) {
|
|||
|
||||
// A lot of resources currently depended on using the empty string as a
|
||||
// nil/unset value.
|
||||
// FIXME: We want this to eventually produce a diff, since there
|
||||
// technically is a new value in the config.
|
||||
{
|
||||
Name: "optional, computed, empty string",
|
||||
Schema: map[string]*Schema{
|
||||
|
|
Loading…
Reference in New Issue