Help! Provider aliases no longer working since .14

Hi @jbardin, thanks for your reply.

From my understanding, I did define the provider ‘aws’ under ‘required_providers’ section of the main terraform block:

terraform {
  required_version = ">= 1.0.0"

  required_providers {
    aws = {
        source  = "hashicorp/aws"
        version = ">= 1.24.0"
    }
   }
}

In the same file, I initiate a module & declare that this module must use providers aws = aws,

module "example" {
   providers = {
    aws = aws
   }
  source = "./example"
}

When I use required_providers under module, it says it is unsupported.

module "example" {
   required_providers = {
    aws = aws
   }
  source = "./example"
}

Error: Unsupported block type
│ 
│   on main.tf line 6, in module "database":
│    6:    required_providers {
│ 
│ Blocks of type "required_providers" are not expected here.

It would be great if I can get a simple example of what you are referring to, thanks :slight_smile: