Expand my Community achievements bar.

Submissions are now open for the 2026 Adobe Experience Maker Awards.
SOLVED

In AEM as a Cloud Service, In Repo Init config file how can I access Environment variables and secrets of different environments(DEV, Stage, Prod) ?

Avatar

Level 2

My Repo Init config file is in Json format. The usual method $[env: VAR_NAME] threw syntax error

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hi @Sharvesh106 

 

The jcr.repoinit module only supports plain text (see SLING-6219). Therefore, you need to add the group name in plain text in the environment-specific OSGi config file.

Arun Patidar

AEM LinksLinkedIn

View solution in original post

3 Replies

Avatar

Community Advisor

Hi @Sharvesh106 
Please check 

 

Environment variable in OSGI config

https://experienceleague.adobe.com/en/docs/experience-manager-cloud-service/content/implementing/dep... 

 

Repoinit supported Syntax 

https://sling.apache.org/documentation/bundles/repository-initialization.html 

 

Can you share sample init config file.

Arun Patidar

AEM LinksLinkedIn

Avatar

Level 2

create group $[env:GROUP_NAME] with path sample

 

Here i am trying to create group dynamically based on the name given on Environment variable

Avatar

Correct answer by
Community Advisor

Hi @Sharvesh106 

 

The jcr.repoinit module only supports plain text (see SLING-6219). Therefore, you need to add the group name in plain text in the environment-specific OSGi config file.

Arun Patidar

AEM LinksLinkedIn