Hi I got stuck with one of the scenario, I have two environments Dev and Prod. I need to pass different values in dev and different vales in prod. So how can I manage it using one Data bag. this is my general Data bag in dev environment
I am using this data bag in Dev environment, so I have to pass different username, passwd and jdbc password for prod environment. How can I do this? I am planning to do in below manner
{
"id": "some_data_bag_item",
"production" : {
"id":"Databag_item",
"username": "username",
"passwd": "****",
"jdbc_password": "****"
}
},
"testing" : {
"id":"Databag_item",
"username": "username",
"passwd": "****",
"jdbc_password": "****
}
}
Is this is a right way? Do we need to add anything else in recipe? Do chef will find out which environment it is automatically?