Fixed a couple of bugs in the TUI like not properly fetching the size of the vpc_arr, or removing the prefix/suffix markers for Ansible's blockinfile from the SSH key
This commit is contained in:
+10
-10
@@ -62,6 +62,16 @@ initialize-environment() {
|
||||
main-menu
|
||||
}
|
||||
|
||||
prompt-for-vpc-id() {
|
||||
readarray -t vpc_arr < <(aws ec2 describe-vpcs | jq -r '.Vpcs[] | "\(.VpcId) \((.Tags[]? | select(.Key | contains("Name")) | .Value) // "")"' | awk '{print($1, $2 == "" ? "-" : $2);}')
|
||||
declare prompt=""
|
||||
for item in "${vpc_arr[@]}"; do
|
||||
prompt+="$item OFF "
|
||||
done
|
||||
|
||||
VPC_ID=$(whiptail --fb --title "Select VPC" --radiolist "Select which VPC to use to deploy resources into" "$BOX_HEIGHT" "$BOX_WIDTH" "${#vpc_arr[@]}" $prompt 3>&2 2>&1 1>&3)
|
||||
}
|
||||
|
||||
deploy-and-run-benchmarkers() {
|
||||
declare title="Deploy and Run Benchmarkers"
|
||||
|
||||
@@ -213,16 +223,6 @@ custom-selections() {
|
||||
main-menu
|
||||
}
|
||||
|
||||
prompt-for-vpc-id() {
|
||||
readarray -t vpc_arr < <(aws ec2 describe-vpcs | jq -r '.Vpcs[] | "\(.VpcId) \((.Tags[]? | select(.Key | contains("Name")) | .Value) // "")"' | awk '{print($1, $2 == "" ? "-" : $2);}')
|
||||
declare prompt=""
|
||||
for item in "${vpc_arr[@]}"; do
|
||||
prompt+="$item OFF "
|
||||
done
|
||||
|
||||
VPC_ID=$(whiptail --fb --title "Select VPC" --radiolist "Select which VPC to use to deploy resources into" "$BOX_HEIGHT" "$BOX_WIDTH" "${vpc_arr[@]}" $prompt 3>&2 2>&1 1>&3)
|
||||
}
|
||||
|
||||
main-menu() {
|
||||
declare choice
|
||||
choice=$(whiptail --fb --title "DynamoDB + DAX Benchmarker" --menu "Select an action" "$BOX_HEIGHT" "$BOX_WIDTH" 7 \
|
||||
|
||||
Reference in New Issue
Block a user