Skip to content

Commit

Permalink
prompt to rebuild bundle as well
Browse files Browse the repository at this point in the history
  • Loading branch information
eschultink committed Aug 1, 2023
1 parent 1ab60da commit e568640
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions tools/upgrade-terraform-modules.sh
Original file line number Diff line number Diff line change
Expand Up @@ -48,3 +48,16 @@ terraform init

printf "Terraform module versions upgraded to ${GREEN}${NEXT_RELEASE}${NC}.\n"
printf "To revert: ${BLUE}$0 ${CURRENT_RELEASE}${NC}\n"

if sed -n -e '/^deployment_bundle\s*=/p' terraform.tfvars > /dev/null; then
# Prompt user
printf "Your ${BLUE}terraform.tfvars${NC} file references a pre-built 'deployment_bundle' bundle."
read -p "Do you want to run './update-bundle' to re-build it with a version matching the terraform modules you just updated? [Y/n] " response

# If user presses Enter without input, default to 'Y'
if [[ -z "$response" || "$response" =~ ^[Yy]$ ]]; then
./update-bundle
else
echo "Bundle not updated."
fi
fi

0 comments on commit e568640

Please sign in to comment.