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

No storage config? #95

Closed
krogebry opened this issue Mar 25, 2017 · 4 comments
Closed

No storage config? #95

krogebry opened this issue Mar 25, 2017 · 4 comments

Comments

@krogebry
Copy link

I'm trying to configure storage options here, but I can't seem to get it to work.

I did this thinking it would magically work:

node.default['hashicorp-vault']['config']['storage'] = {
    'path' => node['stack_name'],
    'address' => 'consul.nmgcloudapps.com:8500'
}

I get this:

/tmp/local-mode-cache/cache/cookbooks/hashicorp-vault/recipes/default.rb:

 16:  end
 17:  
 18:  config = vault_config node['hashicorp-vault']['config']['path'] do |r|
 19:    owner node['hashicorp-vault']['service_user']
 20:    group node['hashicorp-vault']['service_group']
 21:  
 22:    if node['hashicorp-vault']['config']
 23>>     node['hashicorp-vault']['config'].each_pair { |k, v| r.send(k, v) }
 24:    end
 25:    notifies :reload, "vault_service[#{node['hashicorp-vault']['service_name']}]", :delayed
 26:  end

I'm going to try some things locally on this project, we'll see where this goes.

Am I doing something wrong here?

@Ginja
Copy link
Contributor

Ginja commented Mar 25, 2017

That's because ['storage'] isn't a valid config parameter. The key after ['config'] has to be a valid parameter.

address
cluster_address
tls_disable
tls_cert_file
tls_key_file
cache_size
disable_cache
disable_mlock
default_lease_ttl
max_lease_ttl
statsite_addr
statsd_addr
backend_type
backend_options
habackend_type
habackend_options
telemetry_options

Example, setting the habackend_type to consul:

node.default['hashicorp-vault']['config']['habackend_type'] = 'consul'

Refer to the Vault docs here.

@krogebry
Copy link
Author

Okay, so what you're saying is that this:

storage "consul" {
  address = "127.0.0.1:8500"
  path    = "vault"
}

Is actually habackend_type and I should be using that and habackend_options? I'll give it a try and see how it works. Thanks for the feedback.

@Ginja
Copy link
Contributor

Ginja commented Mar 27, 2017

👍

Closing the issue.

@lock
Copy link

lock bot commented May 19, 2019

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 May 19, 2019
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