turnbullpress / tfb-code

The source code for The Terraform Book

Home Page:https://www.terraformbook.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

timeout while creating consul aws_instance.server

MacFlurry opened this issue · comments

hello,

while applying terraform to build consul cluster, I'm getting a timeout while creating
seems like there's no public ip set:

Plan: 3 to add, 0 to change, 1 to destroy.

Do you want to perform these actions?
  Terraform will perform the actions described above.
  Only 'yes' will be accepted to approve.

  Enter a value: yes

module.consul.aws_instance.server[0]: Destroying... (ID: i-07905bea886453d68)
module.consul.aws_instance.server.0: Still destroying... (ID: i-07905bea886453d68, 10s elapsed)
module.consul.aws_instance.server.0: Still destroying... (ID: i-07905bea886453d68, 20s elapsed)
module.consul.aws_instance.server.0: Still destroying... (ID: i-07905bea886453d68, 30s elapsed)
module.consul.aws_instance.server.0: Still destroying... (ID: i-07905bea886453d68, 40s elapsed)
module.consul.aws_instance.server.0: Still destroying... (ID: i-07905bea886453d68, 50s elapsed)
module.consul.aws_instance.server.0: Still destroying... (ID: i-07905bea886453d68, 1m0s elapsed)
module.consul.aws_instance.server[0]: Destruction complete after 1m3s
module.consul.aws_instance.server[0]: Creating...
  ami:                               "" => "ami-f652979b"
  associate_public_ip_address:       "" => "<computed>"
  availability_zone:                 "" => "<computed>"
  ebs_block_device.#:                "" => "<computed>"
  ephemeral_block_device.#:          "" => "<computed>"
  get_password_data:                 "" => "false"
  instance_state:                    "" => "<computed>"
  instance_type:                     "" => "t2.micro"
  ipv6_address_count:                "" => "<computed>"
  ipv6_addresses.#:                  "" => "<computed>"
  key_name:                          "" => "omega_lab_aws"
  network_interface.#:               "" => "<computed>"
  network_interface_id:              "" => "<computed>"
  password_data:                     "" => "<computed>"
  placement_group:                   "" => "<computed>"
  primary_network_interface_id:      "" => "<computed>"
  private_dns:                       "" => "<computed>"
  private_ip:                        "" => "<computed>"
  public_dns:                        "" => "<computed>"
  public_ip:                         "" => "<computed>"
  root_block_device.#:               "" => "<computed>"
  security_groups.#:                 "" => "<computed>"
  source_dest_check:                 "" => "true"
  subnet_id:                         "" => "subnet-063ed4a1adb0dce96"
  tags.%:                            "" => "1"
  tags.Name:                         "" => "consul-consul-server-0"
  tenancy:                           "" => "<computed>"
  volume_tags.%:                     "" => "<computed>"
  vpc_security_group_ids.#:          "" => "1"
  vpc_security_group_ids.1698734946: "" => "sg-05f45d3b5e13edcc4"
module.consul.aws_instance.server.0: Still creating... (10s elapsed)
module.consul.aws_instance.server.0: Still creating... (20s elapsed)
module.consul.aws_instance.server[0]: Provisioning with 'file'...
module.consul.aws_instance.server.0: Still creating... (30s elapsed)
module.consul.aws_instance.server.0: Still creating... (40s elapsed)
module.consul.aws_instance.server.0: Still creating... (50s elapsed)
module.consul.aws_instance.server.0: Still creating... (1m0s elapsed)
module.consul.aws_instance.server.0: Still creating... (1m10s elapsed)
module.consul.aws_instance.server.0: Still creating... (1m20s elapsed)
module.consul.aws_instance.server.0: Still creating... (1m30s elapsed)
module.consul.aws_instance.server.0: Still creating... (1m40s elapsed)
module.consul.aws_instance.server.0: Still creating... (1m50s elapsed)
module.consul.aws_instance.server.0: Still creating... (2m0s elapsed)
module.consul.aws_instance.server.0: Still creating... (2m10s elapsed)
module.consul.aws_instance.server.0: Still creating... (2m20s elapsed)
module.consul.aws_instance.server.0: Still creating... (2m30s elapsed)
module.consul.aws_instance.server.0: Still creating... (2m40s elapsed)
module.consul.aws_instance.server.0: Still creating... (2m50s elapsed)
module.consul.aws_instance.server.0: Still creating... (3m0s elapsed)
module.consul.aws_instance.server.0: Still creating... (3m10s elapsed)
module.consul.aws_instance.server.0: Still creating... (3m20s elapsed)
module.consul.aws_instance.server.0: Still creating... (3m30s elapsed)
module.consul.aws_instance.server.0: Still creating... (3m40s elapsed)
module.consul.aws_instance.server.0: Still creating... (3m50s elapsed)
module.consul.aws_instance.server.0: Still creating... (4m0s elapsed)
module.consul.aws_instance.server.0: Still creating... (4m10s elapsed)
module.consul.aws_instance.server.0: Still creating... (4m20s elapsed)
module.consul.aws_instance.server.0: Still creating... (4m30s elapsed)
module.consul.aws_instance.server.0: Still creating... (4m40s elapsed)
module.consul.aws_instance.server.0: Still creating... (4m50s elapsed)
module.consul.aws_instance.server.0: Still creating... (5m0s elapsed)
module.consul.aws_instance.server.0: Still creating... (5m10s elapsed)
module.consul.aws_instance.server.0: Still creating... (5m20s elapsed)

Error: Error applying plan:

1 error(s) occurred:

* module.consul.aws_instance.server[0]: timeout - last error: dial tcp 10.0.5.154:22: i/o timeout

Regards,

I don't think this is related to the lack of a public IP. I've seen this fault with Terraform and AWS and other tools:

https://www.google.is/search?q=timeout+-+last+error%3A+dial+tcp&oq=timeout+-+last+error%3A+dial+tcp&aqs=chrome..69i57.215j0j7&sourceid=chrome&ie=UTF-8

oh crap... so I'll follow the link and try to figure it out. thanks dude.
Anyway if you figure it out first, please share ;-)

thanks a lot