how to use the env variable to change the value of it in config.dev and config.prod in cfg.json in AEM as a cloud service | Community
Skip to main content
Level 4
May 6, 2022
Solved

how to use the env variable to change the value of it in config.dev and config.prod in cfg.json in AEM as a cloud service

  • May 6, 2022
  • 1 reply
  • 762 views

Hi, can anyone demonstrate the use of env variable in cfg.json file by how can we change the value according to the different variables.

with an example ,I have gone through the documentation but not able to follow up

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by arunpatidar

Please check https://experienceleague.adobe.com/docs/experience-manager-cloud-service/content/implementing/deploying/configuring-osgi.html?lang=en#types-of-osgi-configuration-values

 

Environment-specific values, which are values that vary between Development environments, and thus cannot be accurately targeted by run mode (since there is a single dev runmode in Adobe Experience Manager as a Cloud Service). For example:

{
 "url": "$[env:server-url]"
}
 

Note that a single OSGi configuration file can use any combination of these configuration value types in conjunction. For example:

{
"connection.timeout": 1000,
"api-key": "$[secret:server-api-key]",
"url": "$[env:server-url]"
}

1 reply

arunpatidar
Community Advisor
arunpatidarCommunity AdvisorAccepted solution
Community Advisor
May 6, 2022

Please check https://experienceleague.adobe.com/docs/experience-manager-cloud-service/content/implementing/deploying/configuring-osgi.html?lang=en#types-of-osgi-configuration-values

 

Environment-specific values, which are values that vary between Development environments, and thus cannot be accurately targeted by run mode (since there is a single dev runmode in Adobe Experience Manager as a Cloud Service). For example:

{
 "url": "$[env:server-url]"
}
 

Note that a single OSGi configuration file can use any combination of these configuration value types in conjunction. For example:

{
"connection.timeout": 1000,
"api-key": "$[secret:server-api-key]",
"url": "$[env:server-url]"
}
Arun Patidar