Given the confusing error message:
err: Could not retrieve catalog from remote server: Error 400 on SERVER: Duplicate declaration: File[/etc/logstas
I faced with the same kind of issue when I used create_resource().
This error occurs when you want to run 'file{}' block several times like a loop.
When we are creating a multiple copies of a 'file{}' block, we have to make sure that the NAME OF THE FILE BLOCK is unique, i.e.,
file { "NAME OF THE FILE BLOCK":.....}
If the same name repeats, the above error is raised.
In your case, some value of "${logstash::params::config_dir}" must have been repeated twice.