From 5c40d6610cf4ec77b929ba0c22920107d133d0c7 Mon Sep 17 00:00:00 2001 From: James Bardin Date: Wed, 6 Mar 2019 16:21:32 -0500 Subject: [PATCH] remove NormalizeObjectFromLegacySDK from diff The NormalizeObjectFromLegacySDK calls have been moved into the provider shims, so all objects generated by the provider should conform now. --- command/format/diff.go | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/command/format/diff.go b/command/format/diff.go index 0d641c301..049f62543 100644 --- a/command/format/diff.go +++ b/command/format/diff.go @@ -122,16 +122,6 @@ func ResourceChange( panic(fmt.Sprintf("failed to decode plan for %s while rendering diff: %s", addr, err)) } - // We currently have an opt-out that permits the legacy SDK to return values - // that defy our usual conventions around handling of nesting blocks. To - // avoid the rendering code from needing to handle all of these, we'll - // normalize first. - // (Ideally we'd do this as part of the SDK opt-out implementation in core, - // but we've added it here for now to reduce risk of unexpected impacts - // on other code in core.) - changeV.Change.Before = objchange.NormalizeObjectFromLegacySDK(changeV.Change.Before, schema) - changeV.Change.After = objchange.NormalizeObjectFromLegacySDK(changeV.Change.After, schema) - bodyWritten := p.writeBlockBodyDiff(schema, changeV.Before, changeV.After, 6, path) if bodyWritten { buf.WriteString("\n")