-
Notifications
You must be signed in to change notification settings - Fork 988
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
dial tcp 127.0.0.1:80: connect: connection refused error during terraform plan #1635
Comments
We're seeing this too on Terraform Cloud, we weren't up to date and bumping dependencies seemed to help, but today the problem reappeared. Both platform providers didn't log any outages or interruptions on their status pages. Last week: Terraform 0.15, kubernetes provider 2.0.3, digitalocean provider 2.6.0, helm 2.0.3 |
I have a similar setup and was running into a similar issue. I was able to diagnose it by running
So what happened is:
The simple solutions are to fix the kubernetes version specified in your cluster resource and/or to use |
Can confirm your fix working @bradenmacdonald, very nice. |
We are seeing the same, but on the refresh before something changes. The endpoints are correctly in the state, but it's justing localhost for whatever reason. So the workaround doesn't help in this case. |
@poojaac The versions of Terraform you are using are quite old. I tried to reproduce the issue using latest versions and could not get it to fail. It works as expected:
|
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. |
Description
We are upgrading the EKS module from 17.x to 18.x. As we are creating the kubernetes resources like secrets, configmaps in the same state as we are creating the cluster, we have configured the kubernetes provider block. But kuberenetes provider is not able to talk to the cluster and the terraform plan is failing with the error Error: Get "http://localhost/api/v1/namespaces/kube-system/secrets/git-credentials": dial tcp 127.0.0.1:80: connect: connection refused
Terraform Version, Provider Version and Kubernetes Version
Affected Resource(s)
kubernetes_secret
Terraform Configuration Files
Gist: https://gist.github.com/poojaac/16da64eb70f897a7f042e986395c1068
Debug Output
Gist: https://gist.github.com/poojaac/a4587de0f5a11bd18933fa794edad5c7
Steps to Reproduce
terraform plan
Expected Behavior
Provider should be able to successfully connect to the cluster and terraform plan should be completed without errors
Actual Behavior
Provider is not using the given information to connect to the k8s cluster to create kubernetes resources
Important Factoids
References
Community Note
The text was updated successfully, but these errors were encountered: