@ -1555,7 +1555,7 @@ func (n *NodeAbstractResourceInstance) providerMetas(ctx EvalContext) (cty.Value
// value, but it still matches the previous state, then we can record a NoNop
// change. If the states don't match then we record a Read change so that the
// new value is applied to the state.
func ( n * NodeAbstractResourceInstance ) planDataSource ( ctx EvalContext , checkRuleSeverity tfdiags . Severity ) ( * plans . ResourceInstanceChange , * states . ResourceInstanceObject , instances . RepetitionData , tfdiags . Diagnostics ) {
func ( n * NodeAbstractResourceInstance ) planDataSource ( ctx EvalContext , checkRuleSeverity tfdiags . Severity , skipPlanChanges bool ) ( * plans . ResourceInstanceChange , * states . ResourceInstanceObject , instances . RepetitionData , tfdiags . Diagnostics ) {
var diags tfdiags . Diagnostics
var keyData instances . RepetitionData
var configVal cty . Value
@ -1609,6 +1609,17 @@ func (n *NodeAbstractResourceInstance) planDataSource(ctx EvalContext, checkRule
// producing a "Read" change for this resource, and a placeholder value for
// it in the state.
if depsPending || ! configKnown {
// We can't plan any changes if we're only refreshing, so the only
// value we can set here is whatever was in state previously.
if skipPlanChanges {
plannedNewState := & states . ResourceInstanceObject {
Value : priorVal ,
Status : states . ObjectReady ,
}
return nil , plannedNewState , keyData , diags
}
var reason plans . ResourceInstanceChangeActionReason
switch {
case ! configKnown :