Secret now showing up in the pod `env` output

hi, i added some secrets and added those secrets as environment variables for my pod, but i couldn't see it when i run env in my pod, i'm using {{ RUNPOD_SECRET_secret_name }} as the environment variable value
No description
6 Replies
nerdylive
nerdylive5mo ago
it should be on AWS_ACCESS_KEY_ID if im not wrong? How are you accessing the environment variable on your pod? a web terminal? a ssh connection?
lil_xiang
lil_xiangOP5mo ago
ssh connection, I just run env command to show the env vars
nerdylive
nerdylive5mo ago
Okay so, what i think you need to do is
printenv | awk -F = '{ print "export " $1 "="" $2 """ }' >> /etc/rp_environment
echo 'source /etc/rp_environment' >> ~/.bashrc
printenv | awk -F = '{ print "export " $1 "="" $2 """ }' >> /etc/rp_environment
echo 'source /etc/rp_environment' >> ~/.bashrc
add that line on your dockerfile CMD or Entrypoint
lil_xiang
lil_xiangOP5mo ago
ah, i see, i'll try it thanks btw, isn't exporting secret envs a default behavior for public template?
Madiator2011 (Work)
if you connect over tcp ssh it wont share env variables
lil_xiang
lil_xiangOP5mo ago
ah, i see, got you!
Want results from more Discord servers?
Add your server