Skip to content
This repository has been archived by the owner on Jun 13, 2019. It is now read-only.

About override data bag item #4

Open
sshah-biz opened this issue Apr 24, 2017 · 1 comment
Open

About override data bag item #4

sshah-biz opened this issue Apr 24, 2017 · 1 comment

Comments

@sshah-biz
Copy link

How can override the data bag item for sanely override the data bag item name in our wrapper 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']

Your quick help will be appreciated.

Thank you,
Sanjay

@jasmeralia
Copy link

To add on to this for clarity, 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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants