Terraform init is extremely slow
Problem
Terraform init takes forever and it seems like it is due to provider download. This extremely slow behaviour is consistent for the last 2 days. Working like that is hellish as I'm using terragrunt which runs the `terraform init` command often in my case. Drilling down on the trace logs, I've seen that the download of https://releases.hashicorp.com/terraform-provider-aws/3.22.0/terraform-provider-aws_3.22.0_darwin_amd64.zip takes usually 1-5 minutes minimum. When I simply download this url in my browser, it never takes more than 15 seconds....usually less than 10. When I run the `init` command with trace logs, it is almost always takes many many minutes to finish. I have no internet issues at ALL <img width="645" alt="Screen Shot 2020-12-29 at 2 55 49 PM" src="https://user-images.githubusercontent.com/3888998/103285144-f3b50f80-49e5-11eb-8aa2-87e77c589fe5.png"> Terraform Version [code block] Terraform Configuration Files I have created only one file in my example project, `backend.tf` and this is the its content [code block] Debug Output https://gist.github.com/AlmogCohen/b8af6e33c170c393a63e126226ad7108 Crash Output Not relevant Expected Behavior Terraform provider download should take as fast as it takes in the browser, and terraform init should not take 5 minutes for a very very simple terraform proejct Actual Behavior Terraform provider/plugin downloads takes forever Steps to Reproduce 1. `terraform init` Additional Context I'm using terragrunt, so the `init` comm
Unverified for your environment
Select your OS to check compatibility.
1 Fix
Solution: Terraform init is extremely slow
@AlmogCohen the reason I wanted to look into DNS issues is that golang uses its own DNS resolver rather than the native one, and this has caused issues in Terraform (and many other projects) that can currently only be worked around with a cgo-enabled build. However, if you're not seeing it on a homebrew build then that's probably not the issue. Most of the Terraform Core engineering team is out u
Trust Score
6 verifications
- 1
@AlmogCohen the reason I wanted to look into DNS issues is that golang uses its
@AlmogCohen the reason I wanted to look into DNS issues is that golang uses its own DNS resolver rather than the native one, and this has caused issues in Terraform (and many other projects) that can currently only be worked around with a cgo-enabled build. However, if you're not seeing it on a homebrew build then that's probably not the issue.
- 2
Most of the Terraform Core engineering team is out until next week, so I'm just
Most of the Terraform Core engineering team is out until next week, so I'm just doing basic triage of urgent issues. As other folks run into this - please upvote with a ๐ rather than a comment, to help us prioritize this. I don't think this will get looked at until the team is back but if it turns out there's a more widespread issue I can call folks in.
Validation
Resolved in hashicorp/terraform GitHub issue #27379. Community reactions: 14 upvotes.
Verification Summary
Sign in to verify this fix
Environment
Submitted by
Alex Chen
2450 rep