hello I use the version v13 of terraform since the release of this version we are forced to go through the version.tf system with the required_providers block. CF
Provider Requirements - Configuration Language - Terraform by HashiCorp .
I have a main.tf script that call sub module terraform.
like below
module "wab_device" {
source = "./wab-device"
domain = "aws.eu-west-1.example.com"
os = "Linux"
hostnames = { "JTUFFZ06TEST" : { "vm_name" : "JTUFFZ06TEST" } }
description = "Test description use module wab tfv13"
support_group = "Support group"
}
and i have my version.tf like below
terraform {
required_providers {
wab = {
source = "private-registry.example.com/org/wab"
version = "1.3.2"
}
vault = {
source = "hashicorp/vault"
}
}
required_version = ">= 0.13"
}
so far, so good
i launch my terraform13 init i faced the issue below
Error: Failed to install provider
Error while installing hashicorp/wab: provider registry registry.terraform.io
does not have a provider named registry.terraform.io/hashicorp/wab
terraform doesn’t find the providers on my private registry inside my module . i try to download from internet
so i copy paste the version.tf in the directory ./wab-device
And it’s work like a charm.
But in theory is ok . in pratice i can’t modified my module wab-device beacause it’s a git repo and i’m not owner and i have to do the same thing with 5 other repos…
How can we use the module without specify the version.tf inside the submodule . Can i use Alias instead ?? or .terraformrc
Thanks for your advices i would help me
regards