Open R-leary opened 1 year ago
Voting for Prioritization
Volunteering to Work on This Issue
i have been experiencing this same issue and it was caused by a bad static ip being used as part of my dhcp configuration.
the following configured was configured:
8.8.8.4
8.8.8.8
the correct entry should be 8.8.4.4
.
resolution time with the incorrect settings:
time host iam.amazonaws.com
iam.amazonaws.com has address 52.46.159.95
host iam.amazonaws.com 0.00s user 0.00s system 0% cpu 5.052 total
resolution time with the correct settings:
time host iam.amazonaws.com
iam.amazonaws.com has address 52.46.155.37
host iam.amazonaws.com 0.00s user 0.00s system 13% cpu 0.049 total
i'd double check your dns settings.
there might also be an error being swallowed or unhandled by the provider due to a very short timeout on dns resolution.
@jgangemi thank you so much, now it is finally working!! how did you narrow it down to your dhcp config?
@jgangemi thank you! Got the same issue and your solution has helped.
For beginners like me who have no idea how to change dhcp config check this
Description
Terraform CLI and Terraform AWS Provider Version
Affected Resource(s)
Any aws resources aws_ec2 instance
Terraform Configuration Files
Please include all Terraform configurations required to reproduce the bug. Bug reports without a functional reproduction may be closed without investigation.
Debug Output
Panic Output
N/A
Expected Behavior
I should have received the plan output for provisioning an EC2 instance in AWS
Actual Behavior
The terraform plan command hangs and returns the following error message:
From inspection of the log files, it looks like the HTTP request to https://sts.us-west-2.amazonaws.com never receives a response and times out. This request is then made 25 times in total before the terraform plan process returns the above error message.
I have verified that using the same credentials via the aws CLI, the request to STS succeeds:
It's worth noting that the command_line_user_1 user is an IAM user with AdministrativeAccess.
I have attempted to debug a DNS related issue with dig based on the error message (although I am a little out of my depth when it comes to debugging these network issues):
Steps to Reproduce
terraform init terraform plan terraform apply
Important Factoids
I am running an out-of-the-box AWS setup with no existing services provisioned. The only change that has been made to AWS prior to running terraform plan is to create the IAM user with AdministrativeAccess called command_line_user_1. I have no local Firewall running on my machine, nor on my local network
References
https://github.com/hashicorp/terraform-provider-aws/issues/26043 https://github.com/hashicorp/terraform-provider-aws/issues/16073 https://discuss.hashicorp.com/t/terraform-hangs-on-terraform-plan/7858 https://github.com/golang/go/issues/42700
References
https://github.com/hashicorp/terraform-provider-aws/issues/26043 https://github.com/hashicorp/terraform-provider-aws/issues/16073 https://discuss.hashicorp.com/t/terraform-hangs-on-terraform-plan/7858 https://github.com/golang/go/issues/42700
Would you like to implement a fix?
None