You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Example App name: "Webserver App"
Example Env Name: "webserver-app-a"
In the script, currently, the delimiter being used for cut is ' ' (space)
for ebenvapp in jq -r '.Environments[] | .ApplicationName +" "+ .EnvironmentName' <<< $ebappraw 2>> errors.txt ## Loop over each application and environment pair
do
ebapp=cut -d " " -f1 <<< $ebenvapp 2>> errors.txt ## Extract the Application name
ebenv=cut -d " " -f2 <<< $ebenvapp 2>> errors.txt ## Extract the Environment name
this results in ebapp: "Webserver" & ebenv: "App"
Changing this to delimiter of ':' (colon) is a possible fix tested in our environment with spaces.
for ebenvapp in jq -r '.Environments[] | .ApplicationName +":"+ .EnvironmentName' <<< $ebappraw 2>> errors.txt ## Loop over each application and environment pair
do
ebapp=cut -d ':' -f1 <<< $ebenvapp 2>> errors.txt ## Extract the Application name
ebenv=cut -d ':' -f2 <<< $ebenvapp 2>> errors.txt ## Extract the Environment name
this results in ebapp: "Webserver App" & ebenv: "webserver-app-a"
-Not sure if this is necessary, but in the next line I also put double quotes ("") around the $ebapp
ebnsval=aws elasticbeanstalk describe-configuration-settings --application-name **"$ebapp"** --environment-name $ebenv --query 'ConfigurationSettings[*].OptionSettings[?Namespace==\aws:ec2:vpc`&&OptionName==`VPCId`&&Value!=`null`].OptionName' --region $region --output text 2>> errors.txt` ## If the environment is configured for a vpc return "VPCId"
The text was updated successfully, but these errors were encountered:
I have released Version 2 today, which runs in Python and handles these as dictionaries instead of complex string parsing in bash. This will resolve this issue. Thank you for the feedback.
Example App name: "Webserver App"
Example Env Name: "webserver-app-a"
In the script, currently, the delimiter being used for cut is ' ' (space)
for ebenvapp in
jq -r '.Environments[] | .ApplicationName +" "+ .EnvironmentName' <<< $ebappraw 2>> errors.txt
## Loop over each application and environment pairdo
ebapp=
cut -d " " -f1 <<< $ebenvapp 2>> errors.txt
## Extract the Application nameebenv=
cut -d " " -f2 <<< $ebenvapp 2>> errors.txt
## Extract the Environment nameChanging this to delimiter of ':' (colon) is a possible fix tested in our environment with spaces.
for ebenvapp in
jq -r '.Environments[] | .ApplicationName +":"+ .EnvironmentName' <<< $ebappraw 2>> errors.txt
## Loop over each application and environment pairdo
ebapp=
cut -d ':' -f1 <<< $ebenvapp 2>> errors.txt
## Extract the Application nameebenv=
cut -d ':' -f2 <<< $ebenvapp 2>> errors.txt
## Extract the Environment name-Not sure if this is necessary, but in the next line I also put double quotes ("") around the $ebapp
ebnsval=
aws elasticbeanstalk describe-configuration-settings --application-name **"$ebapp"** --environment-name $ebenv --query 'ConfigurationSettings[*].OptionSettings[?Namespace==\
aws:ec2:vpc`&&OptionName==`VPCId`&&Value!=`null`].OptionName' --region $region --output text 2>> errors.txt` ## If the environment is configured for a vpc return "VPCId"The text was updated successfully, but these errors were encountered: