Skip to content
This repository has been archived by the owner on May 28, 2024. It is now read-only.

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
maximelaboisson committed Apr 30, 2024
1 parent 4d02b41 commit cea9180
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions parse-config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,9 @@ load_dir() {
KEY=${KEY#"application."}
fi

if [[ $KEY =~ ^"$3." ]]; then
KEY=${KEY#"$3."}
PRE="$APPLICATION_NAME."
if [[ $KEY =~ ^"$PRE" ]]; then
KEY=${KEY#"$PRE"}
fi

# Removes the .terraform suffix if it exists
Expand All @@ -49,10 +50,10 @@ load_dir() {
# 2. $WORKDIR/aws-secret

# For aws-parameter-store, we strip the first character since it's always a '_'
AWS_PARAMETER_STORE_VARS=$(load_dir "$WORKDIR/aws-parameter-store" 1 "$APPLICATION_NAME")
AWS_PARAMETER_STORE_VARS=$(load_dir "$WORKDIR/aws-parameter-store" 1)
echo "$AWS_PARAMETER_STORE_VARS"

AWS_SECRET_VARS=$(load_dir "$WORKDIR/aws-secret" 0 "$APPLICATION_NAME")
AWS_SECRET_VARS=$(load_dir "$WORKDIR/aws-secret" 0)
echo "$AWS_SECRET_VARS"

ENV_VARS=""
Expand Down

0 comments on commit cea9180

Please sign in to comment.