Skip to content

Commit 84668ca

Browse files
committed
aws: fix prebuilt artifacts upload
as it's currently complaining on missing region value Signed-off-by: Snir Sheriber <[email protected]>
1 parent 8b340c9 commit 84668ca

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

config/peerpods/podvm/aws-podvm-image-handler.sh

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,7 @@ import_snapshot_n_wait() {
284284
echo "Importing image file into snapshot"
285285

286286
local image_import_json_file=$(mktemp)
287-
cat <<EOF >"image_import_json_file"
287+
cat <<EOF > "${image_import_json_file}"
288288
{
289289
"Description": "Peer Pod VM image",
290290
"Format": "RAW",
@@ -321,10 +321,11 @@ EOF
321321
aws ec2 wait snapshot-completed --snapshot-ids ${SNAPSHOT_ID} --region ${AWS_REGION} || exit $?
322322
}
323323

324+
324325
register_ami() {
325326
echo "Registering AMI with Snapshot $SNAPSHOT_ID"
326327
local register_json_file=$(mktemp)
327-
cat <<EOF >"${register_json_file}"
328+
cat <<EOF > "${register_json_file}"
328329
{
329330
"Architecture": "x86_64",
330331
"BlockDeviceMappings": [
@@ -343,7 +344,7 @@ register_ami() {
343344
"BootMode": "uefi"
344345
}
345346
EOF
346-
AMI_ID=$(aws ec2 register-image --name ${AMI_NAME} --cli-input-json="file://${register_json_file}" --tpm-support v2.0 --output json --region ${REGION} | jq -r '.ImageId')
347+
AMI_ID=$(aws ec2 register-image --name ${AMI_NAME} --cli-input-json="file://${register_json_file}" --tpm-support v2.0 --output json --region ${AWS_REGION} | jq -r '.ImageId')
347348
echo "AMI name: ${AMI_NAME}"
348349
echo "AMI ID: ${AMI_ID}"
349350
}

0 commit comments

Comments
 (0)