Skip to content

Commit

Permalink
remove application.<anything>. prefix
Browse files Browse the repository at this point in the history
  • Loading branch information
dorsradek committed Aug 28, 2024
1 parent 228d671 commit 6adf084
Show file tree
Hide file tree
Showing 6 changed files with 4 additions and 8 deletions.
11 changes: 3 additions & 8 deletions parse-config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,6 @@ load_dir() {

# $3, is the numbers of characters to strip in front of the key
KEY="${KEY:$3}"

# Removes the application.$application_name prefix if it exists
if [[ "$KEY" == "application.$APPLICATION_NAME."* ]]; then
KEY=${KEY#"application.$APPLICATION_NAME."}
fi

# TODO: remove when not needed - we use tag source instead
# Removes the .terraform suffix if it exists
Expand All @@ -58,9 +53,9 @@ load_dir() {
KEY=${KEY#"application.global."}
fi

# Removes the application. prefix if it exists
if [[ "$KEY" == "application."* ]]; then
KEY=${KEY#"application."}
# Removes the application.<anything>. prefix if it exists
if [[ "$KEY" == application.*.* ]]; then
KEY=${KEY#application.*.}
fi

log "source=$FILENAME destination=$KEY"
Expand Down
1 change: 1 addition & 0 deletions test/expectation/.expected
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,6 @@ launch-darkly.key=secret_value
msk.endpoint=https://msk.com
openai.key=beepboop
private=password
redis.kerberos-authz.url=kerberos-authz.cache.dev.pleo.io
sqs.sales.endpoint=https://sputnik-buckname.name.com
with.special.chars=@sbSZN%r!r!&9bgE%x&IC%2Bh952U%jD!o&Tww4^ztH#ds@3R44

0 comments on commit 6adf084

Please sign in to comment.