Skip to content

Commit

Permalink
Fix bug in bash string substitution
Browse files Browse the repository at this point in the history
  • Loading branch information
tjohnes committed Jun 14, 2024
1 parent 974bfa9 commit 87448e0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions aws-quickstart
Original file line number Diff line number Diff line change
Expand Up @@ -166,9 +166,9 @@ terraform_apply () {
# ["10.0.0.0/8","172.16.0.0/12","192.168.0.0/16"]
#
# Do this in two steps:
# Replace ',' with '","'.
# Prepend '["', and append ']"'.
bastion_var_value="${BASTION_REMOTE_ACCESS_CIDR_BLOCKS/,/\",\"}"
# Replace any ',' with '","'.
# Prepend '["', and append '"]'.
bastion_var_value="${BASTION_REMOTE_ACCESS_CIDR_BLOCKS//,/\",\"}"
bastion_var_value="[\"${bastion_var_value}\"]"
else
bastion_var_value="null"
Expand Down

0 comments on commit 87448e0

Please sign in to comment.