Can you / should you pass archive providers?

I’m passing aws providers with aliases and all is well with the world

module a {
  source = "git::"
  providers = {
      aws = aws
      aws.whatever = aws.whatever
  }
}

Where module a takes

terraform {
   required_providers {
     aws = {
       source = "hashicorp/aws"
      configuration_aliases = [
          aws.whatever = aws.whatever
       ]
   }
  }
}

I’m donig some work to bring some old broken spaghetti tf up to stable and part of that is refactoring some modules. The modules take “archive” and “template” providers (I know template is deprecated but stick with me here).

Can you / should you also pass these providers i.e.:

provider "template" = {}
provider "archive" = {}

module a {
  source = "git::"
  providers = {
      aws = aws
      aws.whatever = aws.whatever
      template = template
      archive = archive
  }
}

Where module a takes

terraform {
   required_providers {
     aws = {
       source = "hashicorp/aws"
      configuration_aliases = [
          aws.whatever = aws.whatever
       ]
   }
  template = {
     source = "hashicorp/template"
     version = "2.2.0"
  }
  archive = {
     source = "hashicorp/archive"
     version = "2.2.0"
  }
  }
}

I ask because archive is a data provider and template is deprecated. I’m using tf 0.15.5 and will be upgrading but I’ve run into an issue where terraform init says

Warning: Provider template is undefined 

on main.tf line 72, in module "a":
72:        template = template

No provider named template has been declared in the root module
If you wish to refer to the template provider within the module, add a provider configuration, or an entry in the required_providers block.

Warning: Provider archive is undefined 

on main.tf line 73, in module "a":
73:        archive = archive

No provider named archive has been declared in the root module
If you wish to refer to the archive provider within the module, add a provider configuration, or an entry in the required_providers block.

Which obviously I’ve done. What am I missing? My plan was to get this running clean and then deprecate the use of the template provider all together but this has really stumped me.

Solved this this morning.

provider "template" = {}
provider "archive" = {}

Is wrong

terraform {
   required_providers {
     aws = {
       source = "hashicorp/aws"
       version = "yourversion"
   }
     archive = {
       source = "hashicorp/archive"
       version = "yourversion"
   }
     template = {
       source = "hashicorp/template"
       version = "yourversion"
   }
  }
}

Because I was coming from tf 0.12 to 0.13 to 0.15 the jump from 0.12 to 0.13 updates how providers work going forward.