I am creating LWRP for a cookbook azuretrafficmanager, steps are following
Created Resource:
traffic_manager.rbactions :create default_action :create attribute :resource_group_name attribute :profile_name attribute :subscription attribute :traffic_manager attribute :azure_tokenCreated Provider:
traffic_manager.rbdef whyrun_supported? true end action :create do converge_by("Creating.") do traffic_manager_processor = TrafficManagers.new(@new_resource.resource_group_name, @new_resource.profile_name, @new_resource.subscription, @new_resource.traffic_manager, @new_resource.azure_token) traffic_manager_processor.create_update_profile end # Move on next line, copy/paste error or root cause ? @new_resource.updated_by_last_action(true) endAnd then I am calling this in my recipe
azuretrafficmanager_traffic_manager 'createtrafficmanager' do resource_group_name resource_group_name profile_name profile_name subscription subscription traffic_manager traffic_manager azure_token azure_token action :create endThe above method of calling lwrp isn't working, but when i try the second method which is:
azuretrafficmanager_traffic_manager 'createtrafficmanager' do resource_group_name resource_group_name profile_name profile_name subscription subscription traffic_manager traffic_manager azure_token azure_token action :nothing end.run_action(:create)By following this method(run_action) of calling lwrp, it is working perfectly.
The problem is, why the first syntax of calling lwrps isn't working?