@@ -866,7 +866,7 @@ func (n *NodeAbstractResourceInstance) plan(
866866 diags = diags .Append (
867867 validateResourceForbiddenEphemeralValues (ctx , origConfigVal , schema .Body ).InConfigBody (n .Config .Config , n .Addr .String ()),
868868 )
869- diags = diags .Append (ctx .Deprecations ().ValidateAsConfig (origConfigVal , n .ModulePath ()).InConfigBody (n .Config .Config , n .Addr .String ()))
869+ diags = diags .Append (ctx .Deprecations ().ValidateAsConfig (origConfigVal , schema . Body , n .ModulePath ()).InConfigBody (n .Config .Config , n .Addr .String ()))
870870 if diags .HasErrors () {
871871 return nil , nil , deferred , keyData , diags
872872 }
@@ -1773,7 +1773,7 @@ func (n *NodeAbstractResourceInstance) providerMetas(ctx EvalContext) (cty.Value
17731773 metaConfigVal , _ , configDiags = ctx .EvaluateBlock (m .Config , providerSchema .ProviderMeta .Body , nil , EvalDataForNoInstanceKey )
17741774 diags = diags .Append (configDiags )
17751775 diags = diags .Append (
1776- ctx .Deprecations ().ValidateAsConfig (metaConfigVal , ctx .Path ().Module ()).InConfigBody (m .Config , n .Addr .String ()),
1776+ ctx .Deprecations ().ValidateAsConfig (metaConfigVal , providerSchema . ProviderMeta . Body , ctx .Path ().Module ()).InConfigBody (m .Config , n .Addr .String ()),
17771777 )
17781778 metaConfigVal = marks .RemoveDeprecationMarks (metaConfigVal )
17791779 }
@@ -1853,7 +1853,7 @@ func (n *NodeAbstractResourceInstance) planDataSource(ctx EvalContext, checkRule
18531853 validateResourceForbiddenEphemeralValues (ctx , configVal , schema .Body ).InConfigBody (n .Config .Config , n .Addr .String ()),
18541854 )
18551855 diags = diags .Append (
1856- ctx .Deprecations ().ValidateAsConfig (configVal , ctx .Path ().Module ()).InConfigBody (n .Config .Config , n .Addr .String ()),
1856+ ctx .Deprecations ().ValidateAsConfig (configVal , schema . Body , ctx .Path ().Module ()).InConfigBody (n .Config .Config , n .Addr .String ()),
18571857 )
18581858 configVal = marks .RemoveDeprecationMarks (configVal )
18591859 if diags .HasErrors () {
@@ -2194,7 +2194,7 @@ func (n *NodeAbstractResourceInstance) applyDataSource(ctx EvalContext, planned
21942194 }
21952195
21962196 diags = diags .Append (
2197- ctx .Deprecations ().ValidateAsConfig (configVal , n .ModulePath ()).InConfigBody (n .Config .Config , n .Addr .String ()),
2197+ ctx .Deprecations ().ValidateAsConfig (configVal , schema . Body , n .ModulePath ()).InConfigBody (n .Config .Config , n .Addr .String ()),
21982198 )
21992199 if diags .HasErrors () {
22002200 return nil , keyData , diags
@@ -2512,7 +2512,7 @@ func (n *NodeAbstractResourceInstance) evalProvisionerConfig(ctx EvalContext, bo
25122512
25132513 config , _ , configDiags := ctx .EvaluateBlock (body , schema , n .ResourceInstanceAddr ().Resource , keyData )
25142514 diags = diags .Append (configDiags )
2515- diags = diags .Append (ctx .Deprecations ().ValidateAsConfig (config , n .ModulePath ()).InConfigBody (body , n .Addr .String ()))
2515+ diags = diags .Append (ctx .Deprecations ().ValidateAsConfig (config , schema , n .ModulePath ()).InConfigBody (body , n .Addr .String ()))
25162516 config = marks .RemoveDeprecationMarks (config )
25172517
25182518 return config , diags
@@ -2531,7 +2531,7 @@ func (n *NodeAbstractResourceInstance) evalDestroyProvisionerConfig(ctx EvalCont
25312531 evalScope := ctx .EvaluationScope (n .ResourceInstanceAddr ().Resource , nil , keyData )
25322532 config , evalDiags := evalScope .EvalSelfBlock (body , self , schema , keyData )
25332533 diags = diags .Append (evalDiags )
2534- diags = diags .Append (ctx .Deprecations ().ValidateAsConfig (config , n .ModulePath ()).InConfigBody (body , n .Addr .String ()))
2534+ diags = diags .Append (ctx .Deprecations ().ValidateAsConfig (config , schema , n .ModulePath ()).InConfigBody (body , n .Addr .String ()))
25352535 config = marks .RemoveDeprecationMarks (config )
25362536 return config , diags
25372537}
0 commit comments