Error creating launch configuration: timeout while waiting for state to become '[success]'

1,572 views
Skip to first unread message

Matt Cooper

unread,
Feb 24, 2016, 7:59:39 AM2/24/16
to Terraform
Hi,

I have just been recommended Terraform and starting to run through the tutorials/examples.


When I run "terraform plan" I get "Plan: 4 to add, 0 to change, 0 to destroy." All looks fine at this stage.

Now when I run "terraform apply": 

aws_elb.web-elb: Creating...
aws_security_group.default: Creating...
aws_security_group.default: Creation Complete
aws_launch_configuration.web-lc: Creating...
aws_elb.web-elb: Creation complete
Error applying plan:

1 error(s) occurred:

* aws_launch_configuration.web-lc: Error creating launch configuration: timeout while waiting for state to become '[success]'

I'm probably doing something stupid but any help is appreciated.

Thanks, Matt

Andrew Langhorn

unread,
Feb 24, 2016, 5:33:57 PM2/24/16
to terrafo...@googlegroups.com
Hi Matt,

That error looks to be Terraform waiting for the state of the launch configuration to change, but it's a bit difficult to work out what's going on from that alone.

For the given launch configuration, what is occurring in the console? It might be that the real error lies hidden in there, and isn't/hasn't been exposed to Terraform via the AWS SDKs.

Andrew

--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
 
GitHub Issues: https://github.com/hashicorp/terraform/issues
IRC: #terraform-tool on Freenode
---
You received this message because you are subscribed to the Google Groups "Terraform" group.
To unsubscribe from this group and stop receiving emails from it, send an email to terraform-too...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/terraform-tool/7361d105-a3ec-4e2f-8ff8-02ba3dc9f1fc%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--

Andrew Langhorn
Senior Infrastructure Engineer
Emailandrew....@thoughtworks.com
Telephone+44 7733 339809
ThoughtWorks

feli...@intuit-idea.com

unread,
Feb 29, 2016, 7:02:07 PM2/29/16
to Terraform, andrew....@thoughtworks.com
I am having a similar problem as well. 

the cf file is located below
https://gist.github.com/felixgao/fac4de0906b3c7c75d21

aws_vpc.main: Refreshing state... (ID: vpc-f213fd96)
aws_internet_gateway.default: Refreshing state... (ID: igw-abdd8ace)
aws_security_group.default: Refreshing state... (ID: sg-2458e943)
aws_subnet.subnet.0: Refreshing state... (ID: subnet-de4ebeba)
aws_subnet.subnet.1: Refreshing state... (ID: subnet-880f1bff)
aws_subnet.subnet.2: Refreshing state... (ID: subnet-54a0830d)
aws_launch_configuration.web-lc: Refreshing state... (ID: terraform-example-lc)
aws_elb.web-elb: Creating...
  availability_zones.#:                   "" => "<computed>"
  connection_draining:                    "" => "0"
  connection_draining_timeout:            "" => "300"
  dns_name:                               "" => "<computed>"
  health_check.#:                         "" => "1"
  health_check.0.healthy_threshold:       "" => "2"
  health_check.0.interval:                "" => "30"
  health_check.0.target:                  "" => "HTTP:80/"
  health_check.0.timeout:                 "" => "3"
  health_check.0.unhealthy_threshold:     "" => "2"
  idle_timeout:                           "" => "60"
  instances.#:                            "" => "<computed>"
  internal:                               "" => "<computed>"
  listener.#:                             "" => "1"
  listener.3057123346.instance_port:      "" => "80"
  listener.3057123346.instance_protocol:  "" => "http"
  listener.3057123346.lb_port:            "" => "80"
  listener.3057123346.lb_protocol:        "" => "http"
  listener.3057123346.ssl_certificate_id: "" => ""
  name:                                   "" => "terraform-example-elb"
  security_groups.#:                      "" => "<computed>"
  source_security_group:                  "" => "<computed>"
  source_security_group_id:               "" => "<computed>"
  subnets.#:                              "" => "3"
  subnets.1563875928:                     "" => "subnet-de4ebeba"
  subnets.3654181985:                     "" => "subnet-54a0830d"
  subnets.3883100686:                     "" => "subnet-880f1bff"
  zone_id:                                "" => "<computed>"
aws_elb.web-elb: Creation complete
aws_autoscaling_group.web-asg: Creating...
  availability_zones.#:               "" => "3"
  availability_zones.2050015877:      "" => "us-west-2c"
  availability_zones.221770259:       "" => "us-west-2b"
  availability_zones.2487133097:      "" => "us-west-2a"
  default_cooldown:                   "" => "<computed>"
  desired_capacity:                   "" => "1"
  force_delete:                       "" => "1"
  health_check_grace_period:          "" => "<computed>"
  health_check_type:                  "" => "<computed>"
  launch_configuration:               "" => "terraform-example-lc"
  load_balancers.#:                   "" => "1"
  load_balancers.2211072046:          "" => "terraform-example-elb"
  max_size:                           "" => "2"
  min_size:                           "" => "1"
  name:                               "" => "terraform-example-asg"
  tag.#:                              "" => "1"
  tag.2421615522.key:                 "" => "Name"
  tag.2421615522.propagate_at_launch: "" => "1"
  tag.2421615522.value:               "" => "web-asg"
  vpc_zone_identifier.#:              "" => "<computed>"
  wait_for_capacity_timeout:          "" => "10m"
Error applying plan:

1 error(s) occurred:

* aws_autoscaling_group.web-asg: timeout while waiting for state to become '[success]'

Terraform does not automatically rollback in the face of errors.
Instead, your Terraform state file has been partially updated with
any resources that successfully completed. Please address the error 
On the auto scaling group I see an error of 
Failed
Launching a new EC2 instance 


Description:DescriptionLaunching a new EC2 instance. Status Reason: No default VPC for this user. Launching EC2 instance failed.
Cause:CauseAt 2016-02-27T00:55:00Z an instance was started in response to a difference between desired and actual capacity, increasing the capacity from 0 to 1.

Not sure what is going on. 





Reply all
Reply to author
Forward
0 new messages