xuwang / aws-terraform

Code examples to create CoreOS cluster on AWS with Terraform

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

s3-cloudconfig-bootstrap.sh accountId bug

xueshanf opened this issue · comments

The script uses curl -s http://169.254.169.254/latest/dynamic/instance-identity/document | grep -Eo '([[:digit:]]{12})' to generate AWS accountId, but in rare cases when an instance id contains consecutive 12 digits, the accountId generated would have two numbers which is complete bogus, causing the bootstrap to fail.