From 19b408e05387055611cf78b2f2e18327380d9b71 Mon Sep 17 00:00:00 2001 From: Pam Selle <204372+pselle@users.noreply.github.com> Date: Fri, 22 Nov 2019 16:57:21 -0500 Subject: [PATCH] Only need this one call, don't call the meta func --- states/module.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/states/module.go b/states/module.go index 23a7bcba2..da4ae4b10 100644 --- a/states/module.go +++ b/states/module.go @@ -135,9 +135,8 @@ func (ms *Module) SetResourceInstanceCurrent(addr addrs.ResourceInstance, obj *R // update the resource meta because we have a new instance, so EachMode may have changed ms.SetResourceMeta(addr.Resource, eachModeForInstanceKey(addr.Key), provider) } - // Call setResourceMeta one last time, with the resource's current EachMode, lest the - // provider has updated - ms.SetResourceMeta(addr.Resource, rs.EachMode, provider) + // Update the resource's ProviderConfig, in case the provider has updated + rs.ProviderConfig = provider is.Current = obj }