If you are trying to upgrade your terraform version from 0.12 using the command
terraform 0.13upgrade
You might encounter an error similar to this
Error: Invalid legacy provider address
This configuration or its associated state refers to the unqualified provider "aws".
You must complete the Terraform 0.13 upgrade process before upgrading to later versions.
Run these commands first before trying to re-run "terraform 0.13upgrade"
terraform state replace-provider -- -/aws hashicorp/aws
terraform state replace-provider -- -/template hashicorp/template