terraform-provider-kubectl
terraform-provider-kubectl copied to clipboard
Unable to get the right provider source. It's always pointing to registry.terraform.io/hashicorp/kubectl.
Hi, I'd like to report this issue. I'm always getting this error in Terraform ~> v1.3.0, but it's working fine in v1.2.8.
Error: failed to read schema for module.eks.kubectl_manifest.istio_knative in registry.terraform.io/hashicorp/kubectl: failed to instantiate provider "registry.terraform.io/hashicorp/kubectl" to obtain schema: unavailable provider "registry.terraform.io/hashicorp/kubectl"
I'm using this in all my versions.tf
files within the project.
terraform {
required_version = "~> 1.3.0"
required_providers {
kubectl = {
source = "gavinbunney/kubectl"
version = "~> 1.14.0"
}
}
}
Even tried running the command below but to no avail.
terraform state replace-provider "registry.terraform.io/hashicorp/kubectl" "registry.terraform.io/gavinbunney/kubectl"
Very weird. Witnessed similar behavior today while upgrading / refactoring a module using gavinbunney/kubectl
.
Error: failed to read schema for module.layer_2.module.eks_lb_ctrl.kubectl_manifest.crds in registry.terraform.io/hashicorp/kubectl: failed to instantiate provider "registry.terraform.io/hashicorp/kubectl" to obtain schema: unavailable provider "registry.terraform.io/hashicorp/kubectl"
After reverting a temporarily commented out resource things started working again.
Was running into this as well. Need to explicitly declare the provider in each module...
I have the same issue....
│ Error: Failed to query available provider packages │ │ Could not retrieve the list of available versions for provider hashicorp/kubectl: provider registry registry.terraform.io does not have a provider named │ registry.terraform.io/hashicorp/kubectl │ │ Did you intend to use gavinbunney/kubectl? If so, you must specify that source address in each module which requires that provider. To see which modules are currently │ depending on hashicorp/kubectl, run the following command: │ terraform providers ╵
Was running into this as well. Need to explicitly declare the provider in each module...
Yes, I got it working by repeating the declaration in the root of the terraform dir and in the module that is actuating using this provider.