Expand my Community achievements bar.

Don’t miss the AEM Skill Exchange in SF on Nov 14—hear from industry leaders, learn best practices, and enhance your AEM strategy with practical tips.
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

Avatar

Level 5

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

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Please check https://experienceleague.adobe.com/docs/experience-manager-cloud-service/content/implementing/deploy...

 

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

View solution in original post

1 Reply

Avatar

Correct answer by
Community Advisor

Please check https://experienceleague.adobe.com/docs/experience-manager-cloud-service/content/implementing/deploy...

 

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