Custom facts is a good keyword, and you can get the same effect easier:
FACTER_param1=foo FACTER_param2=bar puppet apply /my/manifest.pp
The "facts" $::param1 and $::param2 will be available to puppet.
Note that it is likely preferable to write an actual bash script instead
of a puppet manifest for this. The whole approach sounds as if you're
using puppet in a way that doesn't cater to its strengths, and hempers
you with some of its weeknesses.
HTH,
Felix