Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

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 4

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]"
}

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]"
}