Loading...
Loading...
When DNS resolver is misconfigured (it happened to me in Docker container after suspending laptop and resuming in other network), the `terraform plan` command fails on SIGSEGV. I'm using remote backend on `app.terraform.io`. Hopefully, `terraform workspace list` handles error correctly with a reasonable error message `Error: Failed to request discovery document: Get https://app.terraform.io/.well-known/terraform.json: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)` ### Terraform Version ``` Terraform v0.12.9 + provider.aws v2.31.0 ``` ### Terraform Configuration Files Not relevant for this issue ### Debug Output Pasting debug output here since it's very short (TF fails soon): ``` TF_LOG=TRACE terraform apply /tmp/plan 2019/10/07 10:27:18 [INFO] Terraform version: 0.12.9 2019/10/07 10:27:18 [INFO] Go runtime version: go1.12.9 2019/10/07 10:27:18 [INFO] CLI args: []string{"/bin/terraform", "apply", "/tmp/plan"} 2019/10/07 10:27:18 [DEBUG] Attempting to open CLI config file: /root/credentials.tf 2019/10/07 10:27:18 Loading CLI configuration from /root/credentials.tf 2019/10/07 10:27:18 [INFO] CLI command args: []string{"apply", "/tmp/plan"} 2019/10/07 10:27:18 [TRACE] Meta.BackendForPlan: instantiated backend of type *remote.Remote 2019/10/07 10:27:18 [DEBUG] Service discovery for app.terraform.io at https://app.terraform.io/.well-known/terraform.json 2019/10/07 10:27:29 [DEBUG] checking for provider in "." 2019/10/07 10:27:29 [DEBUG] checking for provider in "/bin" 2019/10/07 10:27:29 [DEBUG] checking for provider in ".terraform/plugins/linux_amd64" 2019/10/07 10:27:29 [DEBUG] found provider "terraform-provider-aws_v2.31.0_x4" 2019/10/07 10:27:29 [DEBUG] found valid plugin: "aws", "2.31.0", "/root/aws/.terraform/plugins/linux_amd64/terraform-provider-aws_v2.31.0_x4" 2019/10/07 10:27:29 [DEBUG] checking for provisioner in "." 2019/10/07 10:27:29 [DEBUG] checking for provisioner in "/bin" 2019/10/07 10:27:29 [DEBUG] checking for provisioner in ".terraform/plugins/linux_amd64" 2019/10/07 10:27:29 [TRACE] Meta.BackendForPlan: backend *remote.Remote supports operations ``` ### Crash Output see [crash.log](https://gist.github.com/mouchar/ac53dbd25fadc590c09a8e2e4cd66246) ### Expected Behavior A self-explanatory error message like `Cannot resolve host app.terraform.io: Network timeout` or so. ### Actual Behavior SIGSEGV crash ### Steps to Reproduce 1. have an existing workspace with a remote backend 2. change DNS server in `/etc/resolv.conf` to an unreachable address 3. run `terraform apply` ### Additional Context N/A ### References N/A
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.