Datadog - Failed to query available provider packages

Am getting error “Failed to query available provider packages” if I run “terraform init” in the code repo. But its working when I have and in the module repo. file:
terraform {
required_providers {
datadog = {
source = “DataDog/datadog”
version = “>=3.8” }


Configure the Datadog provider

provider “datadog” {
api_key = var.datadog_api_key
app_key = var.datadog_app_key
validate = false
} file:
module “dashboard” {
source = “/dashboard/”
dashboard_name = “test dashboard mar 7”
organization_name = “XX XX”

Error Message:
Error: Failed to query available provider packages

│ Could not retrieve the list of available versions for provider hashicorp/datadog: provider registry does not have a provider named Terraform Registry

│ Did you intend to use datadog/datadog? If so, you must specify that source address in each module which requires that
│ provider. To see which modules are currently depending on hashicorp/datadog, run the following command:
│ terraform providers

1 Like

I have the same issue. Wanted to use the Datadog provider in a module with for_each and this is blocking.
Anyone have ideas for a solution?