I am running into this error with using Terraform rancher2 provider. I am using 3.1.0 since it’s the only one works with harvester. It works fine if I use unaliased provider.
Error:
Error: [ERROR] Normalizing url: no api_url provided
with provider[“registry.terraform.io/rancher/rancher2”],
on line 0:
(source code not available
Calling root module:
module "cluster" {
providers = {
rancher2 = rancher2.southeast
}
source = "./terraform-rancher-cluster-install"
# Variables
group_name = "group1"
kubernetes_version = "v1.28.8"
project_name = "appdevprjct"
rancher_env = "southeast"
}
Providers
provider "rancher2" {
alias = "rancher-southwest"
api_url = data.vault_generic_secret.terraform_rancher_southwest.data["endpoint"]
token_key = data.vault_generic_secret.terraform_rancher_southwest.data["bearer_token"]
}
provider "rancher2" {
alias = "rancher-southeast"
api_url = data.vault_generic_secret.terraform_rancher_southeast.data["endpoint"]
token_key = data.vault_generic_secret.terraform_rancher_southeast.data["bearer_token"]
}
#data for modules
data "vault_generic_secret" "terraform_rancher_southeast" {
path = "terraform/rancher-southeast"
}
data "vault_generic_secret" "terraform_rancher_southwest" {
path = "terraform/rancher-southwest"
}