Loading...
Loading...
<!-- Hi there, Thank you for opening an issue. Please note that we try to keep the Terraform issue tracker reserved for bug reports and feature requests. For general usage questions, please see: https://www.terraform.io/community.html. If your issue relates to a specific Terraform provider, please open it in the provider's own repository. The index of providers is at https://github.com/terraform-providers . --> ### Terraform Version <!--- Run `terraform -v` to show the version, and paste the result between the ``` marks below. If you are not running the latest version of Terraform, please try upgrading because your issue may have already been fixed. --> ``` $ terraform -v Terraform v0.12.20 ``` ### Terraform Configuration Files <!-- Paste the relevant parts of your Terraform configuration between the ``` marks below. For large Terraform configs, please use a service like Dropbox and share a link to the ZIP file. For security, you can also encrypt the files using our GPG public key. --> The issue is not related to any specific configuration. ### Debug Output <!-- Full debug output can be obtained by running Terraform with the environment variable `TF_LOG=trace`. Please create a GitHub Gist containing the debug output. Please do _not_ paste the debug output in the issue, since debug output is long. Debug output may contain sensitive information. Please review it before posting publicly, and if you are concerned feel free to encrypt the files using the HashiCorp security public key. --> I'm pasting it here since it's brief, and it contains keywords that may help other users find the information via search engines: ``` $ TF_LOG=TRACE terraform show 2020/01/28 17:32:08 [INFO] Terraform version: 0.12.20 2020/01/28 17:32:08 [INFO] Go runtime version: go1.12.13 2020/01/28 17:32:08 [INFO] CLI args: []string{"/Users/username/Applications/terraform", "show"} 2020/01/28 17:32:08 [DEBUG] Attempting to open CLI config file: /Users/username/.terraformrc 2020/01/28 17:32:08 [DEBUG] File doesn't exist, but doesn't need to. Ignoring. 2020/01/28 17:32:08 [INFO] CLI command args: []string{"show"} 2020/01/28 17:32:08 [TRACE] Meta.Backend: BackendOpts.Config not set, so using settings loaded from backend.tf:2,2-15 2020/01/28 17:32:08 [TRACE] Meta.Backend: built configuration for "gcs" backend with hash value 1116081078 2020/01/28 17:32:08 [TRACE] Preserving existing state lineage "6aa1ff4c-9210-4b5a-d50a-f92936f9a5a8" 2020/01/28 17:32:08 [TRACE] Preserving existing state lineage "6aa1ff4c-9210-4b5a-d50a-f92936f9a5a8" 2020/01/28 17:32:08 [TRACE] Meta.Backend: working directory was previously initialized for "gcs" backend 2020/01/28 17:32:08 [TRACE] Meta.Backend: using already-initialized, unchanged "gcs" backend configuration 2020/01/28 17:32:08 [TRACE] Meta.Backend: instantiated backend of type *gcs.Backend 2020/01/28 17:32:08 [DEBUG] checking for provider in "." 2020/01/28 17:32:08 [DEBUG] checking for provider in "/Users/username/Applications" 2020/01/28 17:32:08 [DEBUG] checking for provider in ".terraform/plugins/darwin_amd64" 2020/01/28 17:32:08 [DEBUG] found provider "terraform-provider-google_v2.14.0_x4" 2020/01/28 17:32:08 [DEBUG] found valid plugin: "google", "2.14.0", "/Users/username/..../.terraform/plugins/darwin_amd64/terraform-provider-google_v2.14.0_x4" 2020/01/28 17:32:08 [DEBUG] checking for provisioner in "." 2020/01/28 17:32:08 [DEBUG] checking for provisioner in "/Users/username/Applications" 2020/01/28 17:32:08 [DEBUG] checking for provisioner in ".terraform/plugins/darwin_amd64" 2020/01/28 17:32:08 [TRACE] Meta.Backend: backend *gcs.Backend does not support operations, so wrapping it in a local backend 2020/01/28 17:32:08 [TRACE] backend/local: requesting state manager for workspace "production" 2020/01/28 17:32:11 [ERR] Checkpoint error: Get https://checkpoint-api.hashicorp.com/v1/check/terraform?arch=amd64&os=darwin&signature=2ed0eaff-1e9b-6467-291e-e67cb375fb31&version=0.12.20: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers) ``` ### Crash Output <!-- If the console output indicates that Terraform crashed, please share a link to a GitHub Gist containing the output of the `crash.log` file. --> N/A ### Expected Behavior <!-- What should have happened? --> Terraform should run the command, produce a useful error message, or at least respond to a control-C interrupt. ### Actual Behavior <!-- What actually happened? --> Terraform hangs when I run it from the command line. It can't be interrupted with control-C, and I have to find two process IDs and run `kill -9` to stop them. ### Steps to Reproduce <!-- Please list the full steps required to reproduce the issue, for example: 1. `terraform init` 2. `terraform apply` --> I think I found one way to reproduce an intermittent error that has been affecting many Terraform users from time to time, based on other reported issues (see list below). 1. Start with a known good configuration of Terraform on a Mac (macOS Mojave version 10.14.6). It may be possible to reproduce this exact issue on Windows, but I'm not sure. First, run Terraform and verify that a command like `terraform plan` works. 1. Open the Network control panel, choose the active network connection, and click Advanced. 1. Click the DNS tab. You should see the IP address of an Internet DNS server like 8.8.8.8 or the IP address of a router or domain controller on your local network. 1. Add the IP address of an invalid DNS server in the list ABOVE the actual DNS server. In my case, the invalid IP address is on a totally different class of private network. 1. Run the the Terraform command again I am able to run curl in the same terminal and fetch the URL shown in the debug output, so I know the issue is specific to Terraform. Once I re-order the DNS IPs so that the valid DNS IPs are at the top, Terraform starts working again. A command that's hanging still needs to be killed forcefully. ### Additional Context <!-- Are there anything atypical about your situation that we should know? For example: is Terraform running in a wrapper script or in a CI system? Are you passing any unusual command line options or environment variables to opt-in to non-default behavior? --> I think a VPN client modifies my DNS configuration to add the IP address of DNS servers that resolve local hosts when I'm connected to the VPN. When I disconnect from the VPN, Terraform hangs, until I move the correct DNS IP to the top of the list. The VPN client seems to add its nameservers above the global DNS IP address, and sometimes doesn't undo the change-perhaps when the VPN connection isn't terminated gracefully? This appears to be a Go issue, and is not specific to macOS, since a similar problem happens with the Docker CLI client on Ubuntu: https://forums.docker.com/t/docker-pull-results-in-request-canceled-while-waiting-for-connection-client-timeout-exceeded-while-awaiting-headers/73064 For some reason, the Go HTTP client doesn't seem to get past the first invalid DNS IP. Every other application on the Mac works with the incorrect DNS configuration, though DNS resolution is slower. ### References <!-- Are there any other GitHub issues (open or closed) or Pull Requests that should be linked here? For example: - #6017 --> Many other users have reported intermittent issues like this one, which were closed without resolution because the couldn't be reproduced. I'm hoping this issue - #23015 - #22774 - #23458 - #23974 - #20190 - #21876
Click on a version to see all relevant bugs
Terraform Integration
Learn more about where this data comes from
Bug Scrub Advisor
Streamline upgrades with automated vendor bug scrubs
BugZero Enterprise
Wish you caught this bug sooner? Get proactive today.