aws: Shorten the tag names.

This commit is contained in:
Alex Vandiver 2021-05-18 03:37:39 +00:00 committed by Tim Abbott
parent ea98549e88
commit 2a247391ab
1 changed files with 2 additions and 1 deletions

View File

@ -74,7 +74,8 @@ BOOTDATA=$(mktemp)
sed '/^AWS=/ r ./bootstrap-awscli' bootstrap-aws-installer
} >>"$BOOTDATA"
TAGS="[{Key=Name,Value=$SERVER},{Key=role,Value=\"$ROLES\"}]"
TAG_ROLE_NAMES=$(echo "$ROLES" | perl -pe 's/\w+::profile::(\w+)/$1/g')
TAGS="[{Key=Name,Value=$SERVER},{Key=role,Value=\"$TAG_ROLE_NAMES\"}]"
INSTANCE_DATA=$($AWS ec2 run-instances \
--iam-instance-profile 'Name="EC2ProdInstance"' \
--image-id "$AMI_ID" \