Terraform migrate local state to remote

Terraform is very good tool and if you use it at local you quickly see the limite of local state and you will need to go to remote but if you doesn’t wan to remove all your prevouis terraform plan you can migrate manualy your state.

For the first time, copy your terraform state (by default the terraform state saved on your root directory to file with name terraform.tfstate) or use this command to backup all your local state

Source