Use your own custom template for telegraf.conf as this recipe is copying the conf file from templates.
nitishtw/chef-telegraf
chef recipe to install and configure telegraf. It works well with both, Amazon Linux as well as Debian (Ubuntu) instances.
Ruby