aws: Parameter Store get parameters by path -- undefined method `return_keys'

Cookbook version

8.0.1

Chef-client version

14.7.17

Platform Details

CentOS 7 host with chef-client

Scenario:

I m trying to use the get parameter by path for AWS SSM parameter store

Steps to Reproduce:

I just followed the documentation

aws_ssm_parameter_store 'getParametersbypath' do
  path '/test/'
  recursive true
  return_keys 'my_values'
  action :get_parameters_by_path
  aws_access_key node['aws_test']['key_id']
  aws_secret_access_key node['aws_test']['access_key']
end

Expected Result:

should have the results node.run_state[‘my_values’]

Actual Result:

Chef Error compile time error

NoMethodError
-------------
undefined method `return_keys' for Custom resource aws_ssm_parameter_store from cookbook aws

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Comments: 18 (12 by maintainers)

Most upvoted comments

It would be nice, if you can raise the priority to merge this. As it is causing problems on our production system.

Thank you!

I was waiting for someone to CR the the PR I put in but I guess I will just merge and release it which should fix the problem.

To answer my own question: Travis is configured to run chefspec as part of the Delivery pipeline (i.e. https://github.com/chef-cookbooks/aws/blob/576ddd4b/.delivery/project.toml#L1 references https://raw.githubusercontent.com/chef-cookbooks/community_cookbook_tools/master/delivery/project.toml, during the unit phase), but the aws cookbook has no test cases defined. I will follow up on https://github.com/chef-cookbooks/aws/pull/373 to see if we can at least test the “all recipes compile” case.

so it looks like return_keys 'my_values' was removed and if I change to return_key 'my_values' I will look into this tomorrow but it looks like it was likely related to: https://github.com/chef-cookbooks/aws/pull/364 I need to dig through and see if it was an intentional breaking change or a bug. I think its more likely a bug.