-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #562 from beethovenxfi/v3-canary
V3 canary
- Loading branch information
Showing
16 changed files
with
643 additions
and
54 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#!/bin/sh | ||
secrets=$(aws secretsmanager get-secret-value --secret-id api-secrets --region $AWS_REGION | jq -r '.SecretString') | ||
|
||
IFS=$'\n' read -r -d '' -a keys <<< "$(echo $secrets | jq -r 'keys[]')" | ||
|
||
touch .env | ||
chown webapp:webapp .env | ||
for key in "${keys[@]}"; do | ||
value=$(echo $secrets | jq -r ".\"$key\"") | ||
printf "%s=%s\n" "$key" "$value" | ||
done > .env |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#!/bin/sh | ||
# In case we merge two env secrets into a flattened one in the same region | ||
# secrets=$(aws secretsmanager get-secret-value --secret-id api-secrets --region $AWS_REGION | jq -r '.SecretString') | ||
|
||
# IFS=$'\n' read -r -d '' -a key_value_pairs <<< "$(echo $secrets | jq -r --arg prefix "$PREFIX" 'to_entries[] | select((.key | ascii_upcase) | startswith(($prefix+"_") | ascii_upcase)) | ((.key | sub(($prefix+"_"); ""; "i")) + "=" + .value)')" | ||
|
||
# for pair in "${key_value_pairs[@]}"; do | ||
# echo "$pair" | ||
# done | ||
|
||
secrets=$(aws secretsmanager get-secret-value --secret-id api-secrets --region $AWS_REGION | jq -r '.SecretString') | ||
|
||
IFS=$'\n' read -r -d '' -a keys <<< "$(echo $secrets | jq -r 'keys[]')" | ||
|
||
touch /var/app/staging/.env | ||
chown webapp:webapp /var/app/staging/.env | ||
for key in "${keys[@]}"; do | ||
value=$(echo $secrets | jq -r ".\"$key\"") | ||
printf "%s=%s\n" "$key" "$value" | ||
done >> /var/app/staging/.env |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#!/bin/sh | ||
secrets=$(aws secretsmanager get-secret-value --secret-id api-secrets --region $AWS_REGION | jq -r '.SecretString') | ||
|
||
IFS=$'\n' read -r -d '' -a keys <<< "$(echo $secrets | jq -r 'keys[]')" | ||
|
||
touch .env | ||
chown webapp:webapp .env | ||
for key in "${keys[@]}"; do | ||
value=$(echo $secrets | jq -r ".\"$key\"") | ||
printf "%s=%s\n" "$key" "$value" | ||
done > .env |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#!/bin/sh | ||
# In case we merge two env secrets into a flattened one in the same region | ||
# secrets=$(aws secretsmanager get-secret-value --secret-id api-secrets --region $AWS_REGION | jq -r '.SecretString') | ||
|
||
# IFS=$'\n' read -r -d '' -a key_value_pairs <<< "$(echo $secrets | jq -r --arg prefix "$PREFIX" 'to_entries[] | select((.key | ascii_upcase) | startswith(($prefix+"_") | ascii_upcase)) | ((.key | sub(($prefix+"_"); ""; "i")) + "=" + .value)')" | ||
|
||
# for pair in "${key_value_pairs[@]}"; do | ||
# echo "$pair" | ||
# done | ||
|
||
secrets=$(aws secretsmanager get-secret-value --secret-id api-secrets --region $AWS_REGION | jq -r '.SecretString') | ||
|
||
IFS=$'\n' read -r -d '' -a keys <<< "$(echo $secrets | jq -r 'keys[]')" | ||
|
||
touch /var/app/staging/.env | ||
chown webapp:webapp /var/app/staging/.env | ||
for key in "${keys[@]}"; do | ||
value=$(echo $secrets | jq -r ".\"$key\"") | ||
printf "%s=%s\n" "$key" "$value" | ||
done >> /var/app/staging/.env |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.