brikis98 / terraform-up-and-running-code

Code samples for the book "Terraform: Up & Running" by Yevgeniy Brikman
http://www.terraformupandrunning.com/
MIT License
2.92k stars 1.93k forks source link

Chapter 2, 3rd Edition, failed to retrieve auto scaling groups #80

Open Auptla opened 2 years ago

Auptla commented 2 years ago

Hi, I just follow the same code to set up webserver but got this error:

Error: Error retrieving Auto Scaling Groups: RequestError: send request failed
 caused by: Post "https://autoscaling.us-east-1.amazonaws.com/": read tcp 10.2.1.203:61949->54.239.31.70:443: read: connection reset by peer. Most recent activity: {
   ActivityId: "1005ff49-cc81-744f-f20f-e77ef4ee4193",
   AutoScalingGroupARN: "arn:aws:autoscaling:us-east-1:270525063973:autoScalingGroup:2631bb6f-566e-4a03-b93e-59184d13d3a1:autoScalingGroupName/terraform-20220328213350232600000001",
   AutoScalingGroupName: "terraform-20220328213350232600000001",
   Cause: "At 2022-03-28T21:33:50Z a user request created an AutoScalingGroup changing the desired capacity from 0 to 2.  At 2022-03-28T21:33:51Z an instance was started in response to a difference between desired and actual capacity, increasing the capacity from 0 to 2.",
   Description: "Launching a new EC2 instance: i-048608314da1cf0bc",
   Details: "{\"Subnet ID\":\"subnet-0a15fa7edc5db3eb2\",\"Availability Zone\":\"us-east-1e\"}",
   Progress: 30,
   StartTime: 2022-03-28 21:33:54.653 +0000 UTC,
   StatusCode: "PreInService"
 }

Can't figure out what is the issue here, can anyone suggest?

jdmedeiros commented 2 years ago

Where did you get the 3rd edition?

Auptla commented 2 years ago

Where did you get the 3rd edition?

I use code from 3rd edition because my terraform version not compatible with 2nd's code

Wach-E commented 2 years ago

@Auptla has your issue been resolved with the 3rd edition or modified terraform version?

brikis98 commented 2 years ago

Can you provide a bit more context? What code are you running? What command? What's the full log output around the error you have above?

Typically, something like RequestError: send request failed indicates an Internet connectivity issue. Do you have some sort of firewall on your computer or at your office blocking the request? Do other requests go through?