Created
March 23, 2026 23:31
-
-
Save HauptJ/107023f40e22a3c536ad8a3f80065fe0 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| #!/usr/bin/env bash | |
| secret_id=$1 | |
| aws_bin_path="/snap/bin/aws" | |
| secret_val=$(${aws_bin_path} secretsmanager get-secret-value --secret-id ${secret_id} --query SecretString --output text | jq '.[]') | |
| return_code=$? | |
| if [ "$return_code" -eq 0 ]; then | |
| echo $secret_val | |
| return 0 | |
| else | |
| return $return_code | |
| fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment