Closed jgoux closed 2 years ago
@jgoux Have you found a fix. I'm struggling to even use this action. I have a secret named
test/secret
with several key/values in it such astoken
and itsvalue
. How do I retrieve thosekey/values
into my Github Actions workflow. When I try to echo thevalue
, I see nothing, meaning the secret value is actually not been injected??
- name: Read secrets from AWS Secrets Manager into environment variables
uses: abhilash1in/aws-secrets-manager-action@v1.1.0
id: read-secrets
with:
secrets: |
test/secret
parse-json: true
- name: Check if env variable is set after fetching secrets
run: |
echo "test secret is ${token}"
@daba-sharhan I didn't find a solution in my case yet, but in yours, you have to follow their naming convention so your token
would be available under the name TEST_SECRET_TOKEN
.
@jgoux Right. None of those works. If they could have an working example just to show us would have been great. I am leaning to use this action because it seem to have more stars than the others outside there proofing its stability.
@jgoux your usage looks right to me, not sure why it's not working for you. Are you sure you're using the right values for aws-access-key-id
, aws-secret-access-key
and aws-region
? Are you sure your secret is called vite
on AWS Secrets Manager and resides in eu-west-3
?
Can also you also try something like,
- name: Create client .env file
run: |
echo "VITE_AUTH0_AUDIENCE=${{ env.VITE_AUTH0_AUDIENCE }}" >> ./packages/client/.env
This is the alternate way to access environment variables (as described here).
I've also sent you an InMail on LinkedIn to chat about this and help you troubleshoot further.
I also activated Github action debugging but I had no particular debug log for this action
How did you enable debug logging? You need to set a secret called ACTIONS_STEP_DEBUG
with value true
(as per documentation).
I was passing the wrong account credentials so the secrets didn't exist on this particular account. 🤦 Thanks @abhilash1in for the help!
Hello,
I'm trying this Github action on a json (key/values) secret stored in AWS Secrets Manager.
Here is how I use it :
The issue I have is that all the environment variables seem undefined.
My secret is called "vite" and its content is like this :
I'm not sure what I'm missing, I also activated Github action debugging but I had no particular debug log for this action.
Also, note that I already use your github action for another non-json secret on the exact same AWS account, and it works as expected.
I also tried the
${{ env.VITE_SENTRY_ORG_SLUG }}
form without success (the values are all empty).Thanks for your help. 🤞