Error while configuring sensuctl

I am running a recipe which configures sensuctl
The script ran successfully but when I log into the instance and check sensuctl is not configured

bash 'sensuctl config' do
code <<-EOH
sensuctl configure -n --url 'http://127.0.0.1:9090' --username #myusername --password #mypassword
EOH
end

This is my recipe
Can someone help me with this.