{"action":"created","issue":{"url":"https://api.github.com/repos/hashicorp/terraform/issues/3762","labels_url":"https://api.github.com/repos/hashicorp/terraform/issues/3762/labels{/name}","comments_url":"https://api.github.com/repos/hashicorp/terraform/issues/3762/comments","events_url":"https://api.github.com/repos/hashicorp/terraform/issues/3762/events","html_url":"https://github.com/hashicorp/terraform/issues/3762","id":115163783,"number":3762,"title":"provider/aws: unable to bootstrap a spot instance (connection data is not set)","user":{"login":"jwmarshall","id":755928,"avatar_url":"https://avatars.githubusercontent.com/u/755928?v=3","gravatar_id":"","url":"https://api.github.com/users/jwmarshall","html_url":"https://github.com/jwmarshall","followers_url":"https://api.github.com/users/jwmarshall/followers","following_url":"https://api.github.com/users/jwmarshall/following{/other_user}","gists_url":"https://api.github.com/users/jwmarshall/gists{/gist_id}","starred_url":"https://api.github.com/users/jwmarshall/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jwmarshall/subscriptions","organizations_url":"https://api.github.com/users/jwmarshall/orgs","repos_url":"https://api.github.com/users/jwmarshall/repos","events_url":"https://api.github.com/users/jwmarshall/events{/privacy}","received_events_url":"https://api.github.com/users/jwmarshall/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/hashicorp/terraform/labels/bug","name":"bug","color":"f7c6c7"},{"url":"https://api.github.com/repos/hashicorp/terraform/labels/provider/aws","name":"provider/aws","color":"bfdadc"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-11-04T22:28:02Z","updated_at":"2015-11-05T10:06:11Z","closed_at":null,"body":"Maybe I'm missing something silly here, but I cannot seem to bootstrap a spot instance with terraform.\r\n\r\nMy terraform file:\r\n\r\n```\r\nprovider \"aws\" {\r\n    region = \"us-east-1\"\r\n}\r\n\r\nresource \"aws_spot_instance_request\" \"staging\" {\r\n    availability_zone = \"us-east-1c\"\r\n    instance_type = \"m4.xlarge\"\r\n    spot_price = \"0.25\"\r\n    ami = \"ami-9eaa1cf6\"\r\n    key_name = \"chef-client\"\r\n    subnet_id = \"subnet-*****\"\r\n    security_groups = [\"sg-*****\",\"sg-*****\",\"sg-*****\"]\r\n    wait_for_fulfillment = true\r\n    associate_public_ip_address = true\r\n    ebs_optimized = true\r\n    root_block_device = {\r\n        volume_size = 64\r\n        volume_type = \"gp2\"\r\n        delete_on_termination = false\r\n    }\r\n    tags {\r\n        Name = \"staging\"\r\n    }\r\n    provisioner \"chef\" {\r\n      version = \"11.18.6\"\r\n      validation_client_name = \"chef-validator\"\r\n      validation_key_path = \"~/.chef/chef-validator.pem\"\r\n      secret_key_path = \"~/.chef/encrypted_data_bag_secret\"\r\n      server_url = \"http://chef.*****.com\"\r\n      environment = \"staging\"\r\n      node_name = \"*****\"\r\n      run_list = [\"role[bootstrap_ec2]\"]\r\n    }\r\n    connection {\r\n        type = \"ssh\"\r\n        user = \"ubuntu\"\r\n        key_file = \"~/.ssh/chef-client.pem\"\r\n    }\r\n}\r\n```\r\n\r\nThe spot instance is requested, fulfilled, but never bootstrapped. Once the instance exists terraform simply displays the following lines over and over until it a timeout is reached.\r\n\r\n```\r\naws_spot_instance_request.staging (chef): Connecting to remote host via SSH...\r\naws_spot_instance_request.staging (chef):   Host:\r\naws_spot_instance_request.staging (chef):   User: ubuntu\r\naws_spot_instance_request.staging (chef):   Password: false\r\naws_spot_instance_request.staging (chef):   Private key: true\r\naws_spot_instance_request.staging (chef):   SSH Agent: true\r\n```"},"comment":{"url":"https://api.github.com/repos/hashicorp/terraform/issues/comments/154014458","html_url":"https://github.com/hashicorp/terraform/issues/3762#issuecomment-154014458","issue_url":"https://api.github.com/repos/hashicorp/terraform/issues/3762","id":154014458,"user":{"login":"svanharmelen","id":4171547,"avatar_url":"https://avatars.githubusercontent.com/u/4171547?v=3","gravatar_id":"","url":"https://api.github.com/users/svanharmelen","html_url":"https://github.com/svanharmelen","followers_url":"https://api.github.com/users/svanharmelen/followers","following_url":"https://api.github.com/users/svanharmelen/following{/other_user}","gists_url":"https://api.github.com/users/svanharmelen/gists{/gist_id}","starred_url":"https://api.github.com/users/svanharmelen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/svanharmelen/subscriptions","organizations_url":"https://api.github.com/users/svanharmelen/orgs","repos_url":"https://api.github.com/users/svanharmelen/repos","events_url":"https://api.github.com/users/svanharmelen/events{/privacy}","received_events_url":"https://api.github.com/users/svanharmelen/received_events","type":"User","site_admin":false},"created_at":"2015-11-05T10:06:11Z","updated_at":"2015-11-05T10:06:11Z","body":"@jwmarshall I just had a look at the code and noticed that the connection data is not set in the spot resource. So I guess (based on the docs) this should be labeled as a bug and needs to be fixed..."}}