Upgrading modules to 0.13

I’m upgrading some modules that work fine in terraform 0.12, to terraform 0.13. Got the terraform init to complete. Had to up the version on some third-party modules. The terraform apply gives me several errors “Provider configuration not present”. Unfortunately I do not know how to address this:

To work with
its original provider configuration at
provider[“registry.terraform.io/-/null”] is required, but it has been removed.
This occurs when a provider configuration is removed while objects created by
that provider still exist in the state. Re-add the provider configuration to
after which you can remove the provider configuration again.

How do I re-add the provider: in what file, and would it just be like

provider "aws" {
    region = "us-east-1"

Running terraform state replace-provider "registry.terraform.io/-/XYZ" "registry.terraform.io/hashicorp/XYZ" where XYZ was local, null, template and aws (for separate commands) fixed the problem.