From 24ba4229309797c0a5c4296e5843120b658fbb2c Mon Sep 17 00:00:00 2001 From: John Czerkowicz Date: Wed, 15 May 2024 19:26:06 -0400 Subject: [PATCH] fixup --- startupscript/aws/vm-metadata.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/startupscript/aws/vm-metadata.sh b/startupscript/aws/vm-metadata.sh index a4e9c91..b0266ef 100644 --- a/startupscript/aws/vm-metadata.sh +++ b/startupscript/aws/vm-metadata.sh @@ -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 @@ -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