Hi,
i just am not able to find out how this should work - and I read the documentation.
in my module I have
terraform {
required_version = ">= 1.0.0"
required_providers {
proxmox = {
source = "Telmate/proxmox"
version = ">= 2.9.11"
configuration_aliases = [proxmox.root]
}
}
}
And the in my infrastructue part e.g. main.tf I’ve got
provider "proxmox" {
alias = "root"
pm_log_enable = true
pm_log_file = "/tmp/terraform-plugin-proxmox.log"
pm_debug = true
pm_log_levels = {
_default = "debug"
_capturelog = ""
}
}
module "test_vm" {
providers = {
proxmox = proxmox.root
}
count = 1
...
And what I get is
│ Error: Missing required provider configuration
│
│ on main.tf line 12:
│ 12: module "test_vm" {
│
│ The child module requires an additional configuration for provider telmate/proxmox, with the local name "proxmox.root".
│
│ Refer to the module's documentation to understand the intended purpose of this additional provider configuration, and then add an entry for proxmox.root in the "providers" meta-argument in the module block to choose which provider
│ configuration the module should use for that purpose.
╵
╷
│ Error: Provider type mismatch
│
│ on main.tf line 14, in module "test_vm":
│ 14: proxmox = proxmox.root
│
│ The local name "proxmox.root" in the root module represents provider "hashicorp/proxmox", but "proxmox" in module.test_vm represents "telmate/proxmox".
│
│ Each provider has its own distinct configuration schema and provider types, so this module's "proxmox" can be assigned only a configuration for telmate/proxmox, which is not required by module.test_vm.
As you can see, I absolutely don’t understand how this works…
Please don’t send me the official documentation with aws examples, I’ve read that and it didn’t help.
Does somebody have any idea, how this should look like ?
Thank you very much.