Hi,
Am getting error “Failed to query available provider packages” if I run “terraform init” in the code repo. But its working when I have providers.tf and variables.tf in the module repo.
provider.tf 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
}
Main.tf 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
│ registry.terraform.io 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