Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

What happened with the consul data bag? #369

Closed
isuftin opened this issue Nov 8, 2016 · 2 comments
Closed

What happened with the consul data bag? #369

isuftin opened this issue Nov 8, 2016 · 2 comments

Comments

@isuftin
Copy link
Contributor

isuftin commented Nov 8, 2016

Looking at this: #98

In the latest 2.2.0 tag, this is nowhere to be found and I can't find any chatter discussing the removal of this. So are we not using a data bag for the encrypt attribute and tokens?

@legal90
Copy link
Contributor

legal90 commented Dec 16, 2016

Hi @isuftin,
The integrated support of data bags has been removed when custom resources (like consul_config) were implemented: #238 (comment)

The recommended way is managing data bags on the upper level, in wrapper cookbook. For example:

# wrapper_recipe.rb
consul_data = data_bag_item('apps', 'consul')

config = consul_config node['consul']['service_name'] do |r|
  node['consul']['config'].each_pair { |k, v| r.send(k, v) }

  owner node['consul']['service_user']
  group node['consul']['service_group']
  encrypt consul_data['encrypt']   # <== Here we pass the secret data
  notifies :reload, "consul_service[#{node['consul']['service_name']}]", :delayed
end

E.q. you should not include consul::default recipe here, but feel free to use our resources in any way you want :)

@legal90 legal90 closed this as completed Dec 16, 2016
@lock
Copy link

lock bot commented Apr 25, 2020

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.

@lock lock bot locked as resolved and limited conversation to collaborators Apr 25, 2020
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