Skip to content

Allow setting credentials from node.run_state #13

@e100

Description

@e100

Forcing users to use data bags for credentials is too limiting.

Example use case:
In sentry wrapper cookbook:

  1. Randomly generate credentials and store them using https://github.com/zuazo/chef-encrypted-attributes
  2. Populate run_state with plain text values
    node.run_state["sentry_credentials"] = {........}
  3. Include sentry recipe

in sentry::_configure I was thinking a minor edit like this:

if node.run_state["sentry_credentials"]               
  sentry_config = node.run_state["sentry_credentials"]
else                                                  
  sentry_config = data_bag_item(                      
    node["sentry"]["data_bag"],                       
    node["sentry"]["data_bag_item"]                   
  )                                                   
end      

If that would be acceptable or if you have a different idea please let me know and I will create a pull request.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions