So I have a TF setup like this …
terraform {
required_version = ">= 1.0.0"
required_providers {
aws = {
}
}
}
provider "aws" {
}
module "example" {
providers= {
aws = aws
}
}
Even in this situation where I have specified the ‘aws’ provider under ‘required_providers’ it still gives that warning:
Warning: Provider aws is undefined
│
│ on main.tf line x, in module "example":
│ line x: aws = aws
│
│ Module module.example does not declare a provider named aws.
│ If you wish to specify a provider configuration for the module, add an entry for aws in the required_providers block within the module.
But I don’t see any documentation which instruct to use ‘required_providers’ under module or is it? How should I approach this?