{"action":"created","issue":{"url":"https://api.github.com/repos/mitchellh/vagrant-aws/issues/310","repository_url":"https://api.github.com/repos/mitchellh/vagrant-aws","labels_url":"https://api.github.com/repos/mitchellh/vagrant-aws/issues/310/labels{/name}","comments_url":"https://api.github.com/repos/mitchellh/vagrant-aws/issues/310/comments","events_url":"https://api.github.com/repos/mitchellh/vagrant-aws/issues/310/events","html_url":"https://github.com/mitchellh/vagrant-aws/issues/310","id":48329291,"number":310,"title":"elastic ip address allocation isn't working","user":{"login":"mmroden","id":116251,"avatar_url":"https://avatars.githubusercontent.com/u/116251?v=3","gravatar_id":"","url":"https://api.github.com/users/mmroden","html_url":"https://github.com/mmroden","followers_url":"https://api.github.com/users/mmroden/followers","following_url":"https://api.github.com/users/mmroden/following{/other_user}","gists_url":"https://api.github.com/users/mmroden/gists{/gist_id}","starred_url":"https://api.github.com/users/mmroden/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mmroden/subscriptions","organizations_url":"https://api.github.com/users/mmroden/orgs","repos_url":"https://api.github.com/users/mmroden/repos","events_url":"https://api.github.com/users/mmroden/events{/privacy}","received_events_url":"https://api.github.com/users/mmroden/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":10,"created_at":"2014-11-10T23:40:47Z","updated_at":"2016-06-17T20:56:13Z","closed_at":null,"body":"I set the following in my vagrant file:\r\n  \r\n     aws.elastic_ip = \"<my IP>\"  # a known, existing, non-occupied elastic IP\r\n\r\nbut that results in the following error message:\r\n    VagrantPlugins::AWS::Errors::FogError: There was an error talking to AWS. The error message is shown\r\n   below:\r\n\r\n    Could not allocate Elastic IP.\r\n\r\nAssuming that there might be some string strangeness going on, I removed the quotes (either double or single) and produced:\r\n\r\n    There is a syntax error in the following Vagrantfile. The syntax error\r\n    message is reproduced below for convenience:\r\n\r\n    /Users/mroden/Documents/src/more-like-this-pipeline/Vagrantfile:47: no .<digit> floating literal anymore; put 0 before dot\r\n       aws.elastic_ip = xx.xx.xx.xx  # actual number redacted\r\n                           ^\r\n    /Users/mroden/Documents/src/more-like-this-pipeline/Vagrantfile:47: syntax error, unexpected tFLOAT, expecting '('\r\n\r\nI think there must be something wrong with run_instance.sh, line 202.  My ruby-fu isn't that strong, but it looks like that if statement will produce a zero if the regex is matched, according to http://www.ruby-doc.org/core-2.1.4/Regexp.html.  Maybe change to \r\n\r\n    if /\\d+\\.\\d+\\.\\d+\\.\\d+/.match(elastic_ip)\r\n\r\nor even better, something like\r\n\r\n    IPAddress.valid?(elastic_IP)\r\n\r\nsince the regex would allow for an IP like 235.34242.1242.53 to pass.\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/mitchellh/vagrant-aws/issues/comments/226879456","html_url":"https://github.com/mitchellh/vagrant-aws/issues/310#issuecomment-226879456","issue_url":"https://api.github.com/repos/mitchellh/vagrant-aws/issues/310","id":226879456,"user":{"login":"kenorb","id":266306,"avatar_url":"https://avatars.githubusercontent.com/u/266306?v=3","gravatar_id":"","url":"https://api.github.com/users/kenorb","html_url":"https://github.com/kenorb","followers_url":"https://api.github.com/users/kenorb/followers","following_url":"https://api.github.com/users/kenorb/following{/other_user}","gists_url":"https://api.github.com/users/kenorb/gists{/gist_id}","starred_url":"https://api.github.com/users/kenorb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kenorb/subscriptions","organizations_url":"https://api.github.com/users/kenorb/orgs","repos_url":"https://api.github.com/users/kenorb/repos","events_url":"https://api.github.com/users/kenorb/events{/privacy}","received_events_url":"https://api.github.com/users/kenorb/received_events","type":"User","site_admin":false},"created_at":"2016-06-17T20:56:13Z","updated_at":"2016-06-17T20:56:13Z","body":"This happened to my as well:\r\n\r\n```\r\n==> mt-aws-foo: Waiting for instance to become \"ready\"...\r\n==> mt-aws-foo: Terminating the instance...\r\nThere was an error talking to AWS. The error message is shown\r\nbelow:\r\n\r\nCould not allocate Elastic IP.\r\n```\r\n\r\nVagrant 1.8.1 with vagrant-aws (0.7.0) and the following [`Vagrantfile`](https://github.com/EA31337/FX-MT-VM/blob/d07f64a18c2fab4b2562c9bc83413acdf3cb3526/Vagrantfile).\r\n\r\nI've `aws.elastic_ip` set to `true` and 0 running instances on my EC2."}}
{"actor":{"display_login":"kenorb"}}