Skip to content

Commit

Permalink
fixup
Browse files Browse the repository at this point in the history
  • Loading branch information
jmczerk committed May 15, 2024
1 parent dab572e commit 24ba422
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions startupscript/aws/vm-metadata.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ function get_metadata_value_raw() {
local instance_id
instance_id="$(wget --header "X-aws-ec2-metadata-token: ${imds_token}" -q -O - http://169.254.169.254/latest/meta-data/instance-id)"
aws ec2 describe-tags \
--filters "Name=resource-id,Values=${instance_id}" "Name=key,Values=${tag_key}" \
--filters "Name=resource-id,Values=${instance_id}" "Name=key,Values=$1" \
--query "Tags[0].Value" --output text 2>/dev/null
}
readonly -f get_metadata_value_raw
Expand All @@ -32,7 +32,7 @@ function get_metadata_value() {
fi

local tag_key=vwbusr:"$1"
get_metadata_value_raw tag_key
get_metadata_value_raw "${tag_key}"
}
readonly -f get_metadata_value

0 comments on commit 24ba422

Please sign in to comment.