Skip to content

Commit

Permalink
bugfix: userdata template for EIP attachment (#9)
Browse files Browse the repository at this point in the history
  • Loading branch information
rbbrasil committed Jan 10, 2022
1 parent f38b772 commit 28f629e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions template/eip.tpl
@@ -1,9 +1,9 @@
echo 'installing additional software for assigning EIP'

curl --fail --retry 6 -O https://bootstrap.pypa.io/get-pip.py
python get-pip.py --user
python3 get-pip.py --user
export PATH=~/.local/bin:$PATH

pip install aws-ec2-assign-elastic-ip
export AWS_DEFAULT_REGION=$(curl -s http://169.254.169.254/latest/dynamic/instance-identity/document | grep region | awk -F\" '{print $4}')
/bin/aws-ec2-assign-elastic-ip --valid-ips ${eip}
/usr/local/bin/aws-ec2-assign-elastic-ip --valid-ips ${eip}

0 comments on commit 28f629e

Please sign in to comment.