Learn the fundamentals of secret referencing and importing in Infisical.
A
whose values depend on secrets B
and C
from different scopes, a client must have read
access to the scopes of secrets A
, B
, and C
.
MY_SECRET
at the root of some environment and want to reference part of its value from another base secret BASE_SECRET
located elsewhere.
Then consider the following scenarios:
BASE_SECRET
is in the same environment and folder as MY_SECRET
, then you’d reference it using ${BASE_SECRET}
.BASE_SECRET
is at the root of another environment with the slug dev
, then you’d reference it using ${dev.MY_SECRET}
.Reference syntax | Environment | Folder | Secret Key |
---|---|---|---|
${KEY1} | same env | same folder | KEY1 |
${dev.KEY2} | dev | / (root of dev environment) | KEY2 |
${prod.frontend.KEY2} | prod | /frontend | KEY2 |
/some-folder
are being imported into
the current folder context.