-
-
Notifications
You must be signed in to change notification settings - Fork 151
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
Using firewall_rule in custom resource not possible #212
Comments
Hey There If you're looking for more immediate troubleshooting help make sure to check out #general on the Chef Community Slack. There's plenty of folks there willing to lend a helping hand. Thanks for the first issue. We hope we can get back to you soon with a solution. |
Hi there -- are you sure you're executing the firewall rule in the same https://github.com/chef-cookbooks/firewall/blob/master/libraries/provider_firewall_rule.rb#L27 |
Hi, i am just doing exactly what i described in 'Steps to reproduce', nothing more. |
Using resource_name :myapp
...
...
action :configure do
with_run_context :root do
firewall_rule 'https' do
port 443
source '0.0.0.0/0'
protocol :tcp
command :allow
end
end
end |
Cookbook version
2.7.0
Chef-client version
14.11.21
Platform Details
Ubuntu 18.04
Scenario:
Using firewall_rule in a custom resource results in exception Chef::Exceptions::ResourceNotFound
Steps to Reproduce:
Create new cookbook with recipe default.rb:
and resource fw.rb:
Add this cookbook to the runlist of a node.
Expected Result:
Firewall is installed, enabled and the rule is added.
Actual Result:
Using firewall_rule from a custom resource results in exception Chef::Exceptions::ResourceNotFound for firewall[default], error message see under Scenario.
The text was updated successfully, but these errors were encountered: