@@ -869,7 +869,7 @@ func (n *NodeAbstractResourceInstance) plan(
869869 diags = diags .Append (
870870 validateResourceForbiddenEphemeralValues (ctx , origConfigVal , schema .Body ).InConfigBody (n .Config .Config , n .Addr .String ()),
871871 )
872- diags = diags .Append (ctx .Deprecations ().ValidateAsConfig (origConfigVal , n .ModulePath ()).InConfigBody (n .Config .Config , n .Addr .String ()))
872+ diags = diags .Append (ctx .Deprecations ().ValidateAsConfig (origConfigVal , schema . Body , n .ModulePath ()).InConfigBody (n .Config .Config , n .Addr .String ()))
873873 if diags .HasErrors () {
874874 return nil , nil , deferred , keyData , diags
875875 }
@@ -1788,7 +1788,7 @@ func (n *NodeAbstractResourceInstance) providerMetas(ctx EvalContext) (cty.Value
17881788 metaConfigVal , _ , configDiags = ctx .EvaluateBlock (m .Config , providerSchema .ProviderMeta .Body , nil , EvalDataForNoInstanceKey )
17891789 diags = diags .Append (configDiags )
17901790 diags = diags .Append (
1791- ctx .Deprecations ().ValidateAsConfig (metaConfigVal , ctx .Path ().Module ()).InConfigBody (m .Config , n .Addr .String ()),
1791+ ctx .Deprecations ().ValidateAsConfig (metaConfigVal , providerSchema . ProviderMeta . Body , ctx .Path ().Module ()).InConfigBody (m .Config , n .Addr .String ()),
17921792 )
17931793 metaConfigVal = marks .RemoveDeprecationMarks (metaConfigVal )
17941794 }
@@ -1868,7 +1868,7 @@ func (n *NodeAbstractResourceInstance) planDataSource(ctx EvalContext, checkRule
18681868 validateResourceForbiddenEphemeralValues (ctx , configVal , schema .Body ).InConfigBody (n .Config .Config , n .Addr .String ()),
18691869 )
18701870 diags = diags .Append (
1871- ctx .Deprecations ().ValidateAsConfig (configVal , ctx .Path ().Module ()).InConfigBody (n .Config .Config , n .Addr .String ()),
1871+ ctx .Deprecations ().ValidateAsConfig (configVal , schema . Body , ctx .Path ().Module ()).InConfigBody (n .Config .Config , n .Addr .String ()),
18721872 )
18731873 configVal = marks .RemoveDeprecationMarks (configVal )
18741874 if diags .HasErrors () {
@@ -2209,7 +2209,7 @@ func (n *NodeAbstractResourceInstance) applyDataSource(ctx EvalContext, planned
22092209 }
22102210
22112211 diags = diags .Append (
2212- ctx .Deprecations ().ValidateAsConfig (configVal , n .ModulePath ()).InConfigBody (n .Config .Config , n .Addr .String ()),
2212+ ctx .Deprecations ().ValidateAsConfig (configVal , schema . Body , n .ModulePath ()).InConfigBody (n .Config .Config , n .Addr .String ()),
22132213 )
22142214 if diags .HasErrors () {
22152215 return nil , keyData , diags
@@ -2527,7 +2527,7 @@ func (n *NodeAbstractResourceInstance) evalProvisionerConfig(ctx EvalContext, bo
25272527
25282528 config , _ , configDiags := ctx .EvaluateBlock (body , schema , n .ResourceInstanceAddr ().Resource , keyData )
25292529 diags = diags .Append (configDiags )
2530- diags = diags .Append (ctx .Deprecations ().ValidateAsConfig (config , n .ModulePath ()).InConfigBody (body , n .Addr .String ()))
2530+ diags = diags .Append (ctx .Deprecations ().ValidateAsConfig (config , schema , n .ModulePath ()).InConfigBody (body , n .Addr .String ()))
25312531 config = marks .RemoveDeprecationMarks (config )
25322532
25332533 return config , diags
@@ -2546,7 +2546,7 @@ func (n *NodeAbstractResourceInstance) evalDestroyProvisionerConfig(ctx EvalCont
25462546 evalScope := ctx .EvaluationScope (n .ResourceInstanceAddr ().Resource , nil , keyData )
25472547 config , evalDiags := evalScope .EvalSelfBlock (body , self , schema , keyData )
25482548 diags = diags .Append (evalDiags )
2549- diags = diags .Append (ctx .Deprecations ().ValidateAsConfig (config , n .ModulePath ()).InConfigBody (body , n .Addr .String ()))
2549+ diags = diags .Append (ctx .Deprecations ().ValidateAsConfig (config , schema , n .ModulePath ()).InConfigBody (body , n .Addr .String ()))
25502550 config = marks .RemoveDeprecationMarks (config )
25512551 return config , diags
25522552}
0 commit comments