hashicorp / terraform

Terraform enables you to safely and predictably create, change, and improve infrastructure. It is a source-available tool that codifies APIs into declarative configuration files that can be shared amongst team members, treated as code, edited, reviewed, and versioned.
https://www.terraform.io/
Other
42.57k stars 9.54k forks source link

Error: Failed to install provider #32863

Closed nibblesnbits closed 1 year ago

nibblesnbits commented 1 year ago

Terraform Version

Terraform v1.4.0
on windows_amd64
+ provider registry.terraform.io/cloudflare/cloudflare v4.1.0
+ provider registry.terraform.io/hashicorp/azurerm v3.47.0

Your version of Terraform is out of date! The latest version
is 1.4.1. You can update by downloading from https://www.terraform.io/downloads.html

Terraform Configuration Files

terraform {
  required_providers {
    twilio = {
      source  = "twilio/twilio"
      version = "0.18.17"
    }
  }
}

provider "twilio" {

}

data "twilio_api_accounts_keys" "key_name" {
  friendly_name = "terraform"
}

Debug Output

https://gist.github.com/nibblesnbits/cf2e8ea11e7619b715933d57dd429932

Expected Behavior

Twilio provider should be installed

Actual Behavior

Error: Failed to install provider

net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)

Steps to Reproduce

  1. terraform init

Additional Context

The odd thing is that ALL the URLs cited as timing out in the errors respond immediately when used in a browser or curl or the like, so I feel like this is a core issue with Terraform itself rather than the provider. This error also occurs with redislabs/rediscloud.

References

No response

jbardin commented 1 year ago

Hi @nibblesnbits,

The logs appear to indicate that this was a problem connecting to GitHub (specifically objects.githubusercontent.com) from your host. Was this a temporary problem?

Thanks!

nibblesnbits commented 1 year ago

No, it's not a transient issue. I tried dozens of times, both back to back and several minutes apart.

jbardin commented 1 year ago

Thanks @nibblesnbits, I think we would need some more information as to how this specifically applies to terraform, since the output shown only indicates a network or GitHub problem. GitHub's servers definitely returned a 302 for the file, because the client made a request to the correct githubusercontent.com cdn endpoint. Can you manually retrieve the https://github.com/twilio/terraform-provider-twilio/releases/download/v0.18.17/terraform-provider-twilio_0.18.17_SHA256SUMS file from you location?

Do you have any network configuration, VPNs, or proxies which may be interfering with the connection?

jbardin commented 1 year ago

Since the network failure is outside of Terraform's control, I'm going to close this for now. If you have more information showing how Terraform could help remedy the issue, feel free to add it here, or file a new issue with all the relevant data.

Thanks!

github-actions[bot] commented 1 year ago

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. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.