provider type mismatch
Closed this issue · 3 comments
Affected modules
- the whole module
Terraform CLI and Terraform provider versions
Terraform v1.4.4
on darwin_amd64
+ provider registry.terraform.io/ibm-cloud/ibm v1.51.0
Terraform output
terraform init
Initializing the backend...
Initializing modules...
There are some problems with the configuration, described below.
The Terraform configuration must be valid before initialization so that
Terraform can determine which modules and providers need to be installed.
╷
│ Error: Provider type mismatch
│
│ on modules/cloud_services/main.tf line 31, in module "observability_instances":
│ 31: logdna.at = logdna.at
│
│ The local name "logdna.at" in module.cloud_services represents provider "hashicorp/logdna", but
│ "logdna.at" in module.cloud_services.module.observability_instances represents "logdna/logdna".
│
│ Each provider has its own distinct configuration schema and provider types, so this module's "logdna.at"
│ can be assigned only a configuration for logdna/logdna, which is not required by
│ module.cloud_services.module.observability_instances.
╵
╷
│ Error: Provider type mismatch
│
│ on modules/cloud_services/main.tf line 32, in module "observability_instances":
│ 32: logdna.ld = logdna.ld
│
│ The local name "logdna.ld" in module.cloud_services represents provider "hashicorp/logdna", but
│ "logdna.ld" in module.cloud_services.module.observability_instances represents "logdna/logdna".
│
│ Each provider has its own distinct configuration schema and provider types, so this module's "logdna.ld"
│ can be assigned only a configuration for logdna/logdna, which is not required by
│ module.cloud_services.module.observability_instances.
Debug output
Expected behavior
Actual behavior
Steps to reproduce (including links and screen captures)
- Run
terraform apply
Anything else
By submitting this issue, you agree to follow our Code of Conduct
@vburckhardt Am I missing anything here?
Hello @VidyasagarMSC - Looks to be an issue in defining the providers. Could you compare your config with what is in that (working) example: https://github.com/terraform-ibm-modules/terraform-ibm-observability-instances/tree/main/examples/observability_basic
Check in particular https://github.com/terraform-ibm-modules/terraform-ibm-observability-instances/blob/main/examples/observability_basic/version.tf and https://github.com/terraform-ibm-modules/terraform-ibm-observability-instances/blob/main/examples/observability_basic/providers.tf
Looks like misconfiguration so closing. If required please re-open with more info