sous-chefs / consul

Development repository for the consul cookbook
https://supermarket.chef.io/cookbooks/consul
Apache License 2.0
192 stars 244 forks source link

Need some help to override data bag item #432

Closed sshah-biz closed 5 years ago

sshah-biz commented 7 years ago

How can override the data bag item for sanely override the data bag item name in wrapper cookbook - https://github.com/bloomberg/consul-cluster-cookbook. We keep following items in data bag and will like to know what are the changes required to use this by overriding data bag items. ['consul-cluster']['tls']['ssl_key']['item'] ['consul-cluster']['tls']['ssl_cert']['item'] ['consul-cluster']['tls']['ssl_chain']['item']

Following is some more detail about set up and work perform: We have different data bag items for different environments (using different encryption keys) and programmatically determine which item to use based on the environment using a cookbook (so moxie-inventory cookbook generates a node['moxie']['dc_and_mode'] which would be like 'bel_dev', 'pdx_prod', 'aws_poc', etc.).

We've tried setting the attributes through lazy { node['moxie']['dc_and_mode'] }, but that errored on the lazy evaluator. We tried adding it into the recipe before we call this cookbook, but that errored out because it thought the value was nil.

Any quick help will be appreciated.

damacus commented 5 years ago

I'm closing this as it's a general chef-client issue. If you still require further help with this, please drop in on the chef community Slack. Thanks!

lock[bot] commented 4 years ago

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.