From c3ec9f79654321efa2d898144fc3d594aecaea68 Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Tue, 9 Dec 2014 09:27:19 -0800 Subject: [PATCH] Revert "helper/schema: TypeMap computed should mark diff as cmputed" This reverts commit b73078c6705bee3c2afa87cc49416ce7bdcfe42d. --- helper/schema/schema.go | 7 ------- helper/schema/schema_test.go | 23 ----------------------- 2 files changed, 30 deletions(-) diff --git a/helper/schema/schema.go b/helper/schema/schema.go index 08fbb017f..be5a56aa3 100644 --- a/helper/schema/schema.go +++ b/helper/schema/schema.go @@ -584,13 +584,6 @@ func (m schemaMap) diffMap( // If the new map is nil and we're computed, then ignore it. if n == nil && schema.Computed { - // If we don't have an old value, this whole map is computed - if o == nil { - diff.Attributes[k] = &terraform.ResourceAttrDiff{ - NewComputed: true, - } - } - return nil } diff --git a/helper/schema/schema_test.go b/helper/schema/schema_test.go index 1b9a01f28..5351f61d7 100644 --- a/helper/schema/schema_test.go +++ b/helper/schema/schema_test.go @@ -1292,29 +1292,6 @@ func TestSchemaMap_Diff(t *testing.T) { Err: false, }, - { - Schema: map[string]*Schema{ - "vars": &Schema{ - Type: TypeMap, - Computed: true, - }, - }, - - State: nil, - - Config: nil, - - Diff: &terraform.InstanceDiff{ - Attributes: map[string]*terraform.ResourceAttrDiff{ - "vars": &terraform.ResourceAttrDiff{ - NewComputed: true, - }, - }, - }, - - Err: false, - }, - { Schema: map[string]*Schema{ "config_vars": &Schema{