diff --git a/internal/refactoring/cross_provider_move.go b/internal/refactoring/cross_provider_move.go index 67a8e07c40..d6b7dca84d 100644 --- a/internal/refactoring/cross_provider_move.go +++ b/internal/refactoring/cross_provider_move.go @@ -161,6 +161,15 @@ func (move *crossTypeMove) applyCrossTypeMove(stmt *MoveStatement, source, targe }) return diags } + if !resp.TargetState.IsWhollyKnown() { + diags = diags.Append(&hcl.Diagnostic{ + Severity: hcl.DiagError, + Summary: "Provider returned invalid value", + Detail: fmt.Sprintf("The provider %s returned an invalid value during an across type move operation: The returned state contains unknown values. This is a bug in the relevant provider; Please report it.", + move.targetProviderAddr), + Subject: stmt.DeclRange.ToHCL().Ptr(), + }) + } // Finally, we can update the source value with the new value.