Hi,
cc @kautuk_sahni
I am unable to read the environment and secret variables from AEM cloud in my OSGI config (ui.config/src/main/content/jcr_root/apps/proj/osgiconfig/config.author.dev/com.proj.service.impl.ServiceImpl.config.cfg.json)
{ "apiUrl": "$[env:EFIX_BACKEND_URL;default=https://some.value.foo/bar]", "secretKey": "$[secret:EFIX_BACKEND_USER]", "secretVal": "$[secret:EFIX_BACKEND_PASSWORD]", "timeout:Integer":1000 }
We have the environment and secret variables from AEM cloud author as below:
Am i missing something?
Solved! Go to Solution.
Topics help categorize Community content and increase your ability to discover relevant content.
Views
Replies
Total Likes
The variable definition looks correct. I would suggest checking how you are retrieving the values. Please look at this post, which has a full example of how to use the variables once set up https://medium.com/slalom-technology/how-to-use-environment-variables-in-adobe-experience-manager-ae...
Can you verify you don't have a run mode selection conflict?
Something like another config under ui.config/src/main/content/jcr_root/apps/proj/osgiconfig/config.author/com.proj.service.impl.ServiceImpl.config.cfg.json
@EstebanBustamante thanks for your response.
On AEM Cloud DEV we can see the config for the pid com.proj.service.impl.ServiceImpl.config which confirms the runmode is fine, but these osgi config values with expression are not getting replaced from the cloud environment and secret variables as we can see in logs the StringUtils.isNotBlank() is returning false for the config value in service.
The variable definition looks correct. I would suggest checking how you are retrieving the values. Please look at this post, which has a full example of how to use the variables once set up https://medium.com/slalom-technology/how-to-use-environment-variables-in-adobe-experience-manager-ae...
Hi,
The steps mentioned in https://medium.com/slalom-technology/how-to-use-environment-variables-in-adobe-experience-manager-ae... are not working for me. I am getting null values although I am entering the value under Configuration in the program.
Views
Replies
Total Likes
@EstebanBustamante Did you find the suggestions from users helpful? Please let us know if more information is required. Otherwise, please mark the answer as correct for posterity. If you have found out solution yourself, please share it with the community.
Views
Replies
Total Likes