I want to create a 50 cloud manager variables., I know how to create a cloud manager variable manually (https://experienceleague.adobe.com/en/docs/experience-manager-cloud-service/content/implementing/usi...)
I am looking for two things:
Creating 50+ variables manually increases the risk of human error. Is there a way to create these variables in bulk, or is there any code to help automate the creation of a large number of Cloud Manager variables?
If I set up all 50+ variables in the dev environment, is there a way to export and import them into other environments, like stage and prod?
Solved! Go to Solution.
Views
Replies
Total Likes
You can use aio cli. https://github.com/adobe/aio-cli-plugin-cloudmanager?tab=readme-ov-file#aio-cloudmanagerenvironments... It accepts json and yaml files as inputs which you can use to set bulk.
To reuse from dev you can use list-variables with json output https://github.com/adobe/aio-cli-plugin-cloudmanager?tab=readme-ov-file#aio-cloudmanagerenvironmentl... which you can then use to set on other environments using set-variable.
Hope this helps.
You can use aio cli. https://github.com/adobe/aio-cli-plugin-cloudmanager?tab=readme-ov-file#aio-cloudmanagerenvironments... It accepts json and yaml files as inputs which you can use to set bulk.
To reuse from dev you can use list-variables with json output https://github.com/adobe/aio-cli-plugin-cloudmanager?tab=readme-ov-file#aio-cloudmanagerenvironmentl... which you can then use to set on other environments using set-variable.
Hope this helps.
Thanks for your response. can you share me any sample file for json or yaml?
Views
Replies
Total Likes
Hi @Mario248
As @h_kataria mentioned , yuou need to rely on CLI or API to create variable in bulk
API References : https://developer.adobe.com/experience-cloud/cloud-manager/reference/api/#tag/Variables/operation/pa...
API and CLI accept json, where you can create/modify all the variable using a single command.
Sample Json file
[
{
"name": "APP_USER",
"value": "aaaa-prod@bbbbb.com",
"type": "string"
},
{
"name": "APP_PASSWORD",
"value": "xxxxxxxxxx",
"type": "string"
},
{
"name": "LOG_LEVEL",
"value": "2",
"type": "string"
},
{
"name": "ENV_TYPE",
"value": "dev",
"type": "string"
},
{
"name": "MY_VAR1",
"value": "myValue",
"type": "string",
"service": "author"
}
]
Views
Likes
Replies
Views
Likes
Replies