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

Cannot get the dns verification working following the steps on README.md #141

Open
chekkan opened this issue Jun 13, 2024 · 0 comments
Open

Comments

@chekkan
Copy link

chekkan commented Jun 13, 2024

I've got a file at libraries/acme_dns.rb with the content from the readme file defining the install_dns_challenge method and remove_dns_challenge. Using in my recipe with resource acme_certificate.

include_recipe 'acme::default'

apitoken = chef_vault_item('secrets', 'tokens')['dns_provider_token']

include_recipe 'prometheus::use_lwrp'

acme_certificate node['fqdn'] do
  key "/path/to/key.key"
  crt "//path/to/cert.crt"
  install_authz_block install_dns_challenge(apitoken)
  remove_authz_block remove_dns_challenge(apitoken)
end

But, I am getting the following error...

Failure/Error: ChefSpec::SoloRunner.new(platform: 'ubuntu', version: '22.04').converge(described_recipe)
     NoMethodError:
       undefined method `install_dns_challenge' for Custom resource acme_certificate from cookbook acme

           raise NoMethodError, "undefined method `#{method_symbol}' for #{self.class}"
           ^^^^^
chef --version
Chef Workstation version: 24.4.1064
Test Kitchen version: 3.6.0
Cookstyle version: 7.32.8
Chef Infra Client version: 18.4.12
Chef InSpec version: 5.22.40
Chef CLI version: 5.6.14
Chef Habitat version: 1.6.652

I am new to chef and ruby. Perhaps I am not getting how the helper method is supposed to be used.

@chekkan chekkan changed the title Cannot get the dns challenge working following the steps on README.md Cannot get the dns verification working following the steps on README.md Jun 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant