I’m attempting to perform terraform init with modules using the kubectl_manifest, this is what I get:
Initializing provider plugins...
- Finding latest version of hashicorp/kubectl...
- Reusing previous version of hashicorp/azuread from the dependency lock file
- Reusing previous version of hashicorp/kubernetes from the dependency lock file
- Reusing previous version of hashicorp/helm from the dependency lock file
- Reusing previous version of hashicorp/null from the dependency lock file
- Reusing previous version of hashicorp/local from the dependency lock file
- Reusing previous version of hashicorp/azurerm from the dependency lock file
- Reusing previous version of hashicorp/random from the dependency lock file
- Finding gavinbunney/kubectl versions matching "1.9.1"...
- Using previously-installed hashicorp/azurerm v2.48.0
- Using previously-installed hashicorp/random v3.1.0
- Installing gavinbunney/kubectl v1.9.1...
- Installed gavinbunney/kubectl v1.9.1 (self-signed, key ID AD64217B5ADD572F)
- Using previously-installed hashicorp/azuread v1.4.0
- Using previously-installed hashicorp/kubernetes v2.0.2
- Using previously-installed hashicorp/helm v2.0.2
- Using previously-installed hashicorp/null v3.1.0
- Using previously-installed hashicorp/local v2.1.0
Partner and community providers are signed by their developers.
If you'd like to know more about provider signing, you can read about it here:
https://www.terraform.io/docs/cli/plugins/signing.html
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
If you have just upgraded directly from Terraform v0.12 to Terraform v0.14
then please upgrade to Terraform v0.13 first and follow the upgrade guide for
that release, which might help you address this problem.
I’ve seen advice on another thread on this forum suggesting that using a terraform block that looks like this might resolve the issue:
terraform {
required_providers {
kubectl = {
source = "gavinbunney/kubectl"
version = "1.9.1"
}
}
}
I’ve tried this and its made no difference, I get the exact same error as before. I have also seen people recommend the following:
cp -R .terraform/plugins/registry.terraform.io/gavinbunney/kubectl .terraform/plugins/registry.terraform.io/hashicorp
This does not work for me either as I have no .plugins directory under any of my .terraform directories.
Any guidance / help in resolving this would be much appreciated.