Skip to content

Cannot use action_class methodsΒ #85

@Lasering

Description

@Lasering

πŸ‘» Brief Description

action_class methods cannot be invoked

πŸ₯ž Cookbook version

2.0.16

πŸ‘©β€πŸ³ Chef-Infra Version

18

🎩 Platform details

CentOS 7
AlmaLinux 8

Steps To Reproduce

consul_certificate = certificate_manage 'consul-server' do
  data_bag 'service-discovery'
  data_bag_secret Chef::Config['encrypted_data_bag_secret']

  create_subfolders false
  cert_path '/etc/consul/ssl'

  action :create
end

print(consul_certificate.key_path)
print(consul_certificate.key) # as documented in the readme section ".certificate, .key, .chain helper method usage"

Fails with:

NoMethodError
-------------
undefined method `key_path' for Custom resource certificate_manage from cookbook certificate

πŸš“ Expected behavior

The correct path should be printed.

βž• Additional context

The key_path is being used in other resources.
This error occurs when using a kitchen converge.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions