Update terraform cloud state immediately

I want to create 20K resources with TF and I’m afraid of failure or stuck on TF and losing the sync.
Is there any possibility to update the state file on each resource that has been created instead of at the end of the process?

Hi @KamranBiglari,

The forthcoming v1.5.0 release of Terraform CLI will save intermediate state snapshots periodically during the apply step, to minimize the window of loss due to a crash. This behavior will be active by default and so won’t need any special configuration other than upgrading to the new release once it’s available.

The v1.5 series will enter its prerelease (beta and release candidate) period soon, and the final release should follow soon after, depending on beta feedback.