What are Statics and Secrets?
Statics and Secrets are great ways to manage environmental variables in the ODJ. While Statics are environmental variables without a sensitive content, secrets are things like passwords, etc. These are stored secure and are only available at runtime.
Add Statics to your components
First of all you have to create something like a group for different Statics. This can be done on the product detail page.
After that you can define different Statics for different stages. Just click on the pencil button at the stage you want to have these.
Now you can add multiple Statics with different values.
After everything is deployed, you have access to your Statics in environment variables with the schema of "ODJ_DEP_NAMEOFSTATICGROUP_NAMEOFSTATIC".
Please be aware, that you have to add this new Statics group to your components where you want to use them. Therefore you open the component detail page and click on the pencil icon on the very top. There you can edit the dependencies and select the Statics group.
Add Secrets to your components
Secrets work the same way as Statics. First of all you have to create a group of different Secrets. This can be done on the product detail page.
After that you can define different Secrets for different stages. Just click on the pencil button at the stage you want to have these.
Now you can add multiple Secrets with different encrypted values. After everything is deployed, you have access to your Secrets in environment variables with the schema of "ODJ_DEP_NAMEOFSECRETGROUP_NAMEOFSECRET".
Please be aware, that you have to add this new Secrets group to your components the same way you did for Statics (see caution above).